Welcome back.
Let's continue our understanding of ant and float.
We talked about the idea of these two data types and how we can use operations on them that we're familiar
with from math class, plus a few ones that maybe we haven't seen before, such as modulo or the double
slash or the double multiply for the power of.
Now this is really cool because we can get our computers to do well.
Math for us like a calculator, right?
But a programming language also provides for us different actions that we can perform.
Now, besides these ones, we also learn that there's a type of action that we can take.
There's a print action that we can take, but there's also specific math type functions that ant and
float are able to use that are built into Python.
Now these are called wall math functions and functions.
Something we'll talk about later on are these actions that we've been talking about.
Remember our diagram here.
We're starting to learn about the data types and the actions that we can perform on them.
Now, in most programming languages, these actions are called functions and we have a whole section
on them.
But for now there are some functions that we can use.
So this is a print function, this is a type function, but there's specific math functions such as
brute.
And you see right away when I type Ripple is a tool like an ID that hints and tells us what we can add.
So says round and give me a number.
And maybe a digit, but let's just worry about the first one for now.
So around if I do 3.1 and I round here.
I get.
Two.
Hmm.
Well, that's not right.
Right.
That's actually the result from up here, because we need to also tell it to perform with a function
of print.
Hey, print to the screen.
Whatever the result of this is.
And just to make things easier to see, I'm going to comment this out.
So I'm just selecting everything and then pressing command slash or if you're on Windows Control slash
if I click Run.
I get three because I'm rounding down the number.
So let's say if it was 3.9, I click.
And I get four again.
I'm rounding the number.
Another math function that's built into Python is something called a, B, s, and you see right away
that I get abs here and ABS returns the absolute value of the argument.
And again, for those that aren't too familiar with math, an absolute value simply means, well, no
negative numbers.
So an absolute value of -20 is 20.
And now because we know about math functions, I can start Googling, right?
I can say, hey, I'm a python programmer and I want to learn about math functions.
Well, I can go Python three math functions.
And look at that right away.
Google tells me that there's a ton that we can use.
You don't have to memorize all of these.
As a matter of fact, some of these I've never, ever used in my programming career.
But it's good to know that they have these tools available to you.
And as a programmer, this is something that you'll have to get used to.
The idea that you won't actually memorize every single action that we can take for each data type,
because some of these are very rarely used, some of them you'll never use in your career.
The key is to understand how to Google them and how to find them.
And throughout this course, I will show you the important ones that you're going to see over and over
and over.
But as a way for you to develop as a programmer, at least you know that this is how you look for answers
and find out that, hey, there's different math functions that we can use with numbers.
All right.
Let's take a break and continue in the next video.
Bye bye.