Basic Arithmetic Operations
Python supports the same five arithmetic operations—addition, subtraction, multiplication, division, and exponentiation—but it uses different symbols for multiplication, division, and exponentiation. Python also adheres to the basic rules of mathematics.
To perform multiplication, you must use '*'. Unlike in traditional mathematics where you might write xy or x × y, in Python, you need to write x*y.
z = x * y
For division, you must use '/', never ÷ or a fraction bar.
z = x / y
Powers
When it comes to writing an exponent you don't use ^ instead you use ** like this y**x not yx.
z= y**x
Another example could be b2 = b × b would normal be written as b2 but instead itw wrote as :
b ** 2 = b * b
Floor Division and Remainder
if you divide two numbers using / you'll get a float (2.5). For example:7/4
This will give you 1.75 with .75 as the fractional part. While if you use floor division.
7//4
This turns to be 1 because everything after the "." drops off.
Now if you use % what do you think will happen?
This is the remainder of whatever is left after you divide 7 by 4.
Calling functions
Python itself is relatively simple, but Python contains a standard library that can be used to create powerful programs. A library is a collection of code that has been written and translated by someone else. A standard library is a library that is considered part of the language and must be included with the language. Python's standard library is structured into modules, each containing related functions and data types. Before you can use functions from a module, you must explicitly import them into your program. An example of this is the math module. To be able to square root you need to type "sqrt". It will look something like this: