‫Well, my dear friends, who in this lesson we will learn about the numbers day to type in Python as
‫well as how to use it.
‫So let's get started.
‫So no data types store numeric values.
‫There are three numeric types in Python.
‫And sinor integers, they're often called just integers or ense, they can be positive or negative whole
‫numbers.
‫But with no decimal point, float, floating point, real values, they represent real numbers and are
‫written with a decimal point.
‫Dividing the integer and fractional part float can also be scientific numbers with an E to indicate
‫the power of ten float or floating point number is a number positive or negative containing one or more
‫decimals.
‫Complex, complex energies.
‫They are in the form of A plus B, J were A and B are float's and J or J represents the square root
‫of one, which is an imaginary number.
‫So the real part of the number is a.
‫And the imaginary part is B, complex numbers are not used that much in Python programming.
‫But it's good to know it's there.
‫So let's create a variable named A. And let's let it be 10.
‫And checking the data type of the variable, as you can see, the data type of the variable A is integer.
‫So create another variable named B and let's vote to be ninety nine point nine.
‫As you can see, that data type of variable B is float.
‫Create another variable named Kay and let it be 45.
‫Dot j.
‫As you can see, the data type of variable C is complex.
‫So as a result, variables of numeric types are created when you assign a value to them.
‫Verify that type of any object, use the type function.
‫And guess what?
‫That's it.
‫Now we can start learning math operators in Python.
‫-- operators.
‫Math operators, also known as arithmetic operators in Python are used with numeric values to perform
‫common mathematical functions.
‫Most commonly use math operators in Python are addition, subtraction.
‫Multiplication.
‫Division.
‫Modulus Exponentiation and Floor Division.
‫Now, why don't we examine each one of these individually?
‫Additions in Python is pretty much the same as additions in regular math.
‫Values are added on either side of the operator in Python.
‫The addition process is as follows.
‫So let's create a variable named number one and let it be fifteen.
‫And create another variable, name number two to be 47.
‫It's number one, plus number two.
‫Is 62.
‫Great, another variable named number three and let it be nineteen point five.
‫Create another variable, name number four.
‫And let it be 33.
‫Number three, plus number four.
‫Is fifty two point five to.
‫Now, the process of subtraction is pretty much the same in mathematics as well.
‫We'll subtract the right hand operand from the left hand off her hand.
‫So in Python, subtraction process looks like this.
‫So let's use the variable we just created.
‫Number two, minus number one.
‫This 32 number four, minus number three is.
‫Thirteen point five.
‫If we do multiplication in Python, we'll use the asterisk Mark.
‫So in Python, the multiplication process looks like this.
‫Number one.
‫Times number two is.
‫705.
‫Number three, times number four.
‫Is six hundred forty three point five.
‫So when we use a slash mark, we can do division.
‫It will divide the left hand operand by the right hand operand.
‫So in Python division, looks like this number one divided by number two.
‫Number three, divided by number four.
‫The percent mark.
‫That'll divide the left hand operand by the right hand operand and returns the remainder.
‫So in Python, the modulus process is as follows.
‫Number two, divided by number one.
‫Is to.
‫Number four, divided by number three.
‫Is thirteen point five.
‫Now, if we want to find the power of a number, will this need to use the double asterisk, Mark?
‫So in Python Exponentiation, looks like this four to the power of three is 64.
‫Generes, the power of five is one hundred thousand.
‫So can we find the square roots of a number?
‫Of course.
‫And the answer is nine point zero.
‫What about floor division?
‫So the division of operands, where the result is the quotient in which the digits after the decimal
‫point are removed.
‫But if one of the operands is negative, the result is flawed.
‫That is rounded away from zero towards negative infinity.
‫So in Python, Florida, division looks like this.
‫Number two, slash slash.
‫Number one is three.
‫Number four, double slash.
‫Number three is one point zero.
‫Now, the sequence of operations in Python is exactly the same as in mathematics.
‫So the parentheses or always done first multiplication and division is always done before addition and
‫subtraction and operations are evaluated from left to right.
‫Now, when we are confused, we can always use brackets.
‫For example.
‫Right.
‫So if that looks confusing, try it with Brackett's.
‫And the result is negative for.
‫So in this lesson, we've been learning the numbers and the math operators in Python and where and how
‫to use them.
‫Right.
‫So now our next exercise is the hypotenuse finder.
‫So in this exercise, we're going to try to find the hypotenuse with the help of math operators.
‫As you may recall, the hypotenuse formula is A squared plus B squared equals C squared.
‫So let's create a variable named A..
‫And ask for the value to be entered by the user.
‫And create another variable and B and ask for that value to be entered by the user.
‫So now we create another variable name, see, and let that be the hypotenuse formula.
‫So this point we want to find sees value, not the seize power.
‫So we add asters asterisk zero point five says print the result on the screen.
‫What do you think?
‫So this exercise in this section is the BMI calculator.
‫So we're gonna try to find the BMI value using the information provided by the user with the help of
‫our math operators.
‫And what we call BMI is the body mass index.
‫I'm sure you've heard of it.
‫It's calculated with a person's weight and height values.
‫So the formula is weight divided by height squared.
‫Let's create a variable named Height and ask for the value to be entered by the user.
‫And create another variable named wait and ask for that value to be entered by the user.
‫Now we'll create another variable named BMI and let that be the BMI formula.
‫So let's print that result on the screen.
‫And there you go.
‫Now, I want to see in the next lesson, so I have a great day.