Welcome back.
Let's continue our understanding of it 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 learned that there's a type action that we can take.
There's a print action that we can take, but there's also specific math type functions that aren't
and are able to use that are built into Python.
Now, these are called Wilmuth 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 around.
And you see right away, when I type, Reppel is a tool like an ad that hints and tells us what we can
at.
So says round and give me a number.
And maybe and digit, but let's just worry about the first one for now.
So around if I do three point one and I round here.
Two.
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.
Or if you're on Windows control, if I click run.
I get three because I'm rounding down the number.
So let's say if it was three point nine, 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 negative 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, 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, 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.