Numbers and Math functions: – There are three numeric types in Python int, float, complex. Variables of numeric types are created when you assign a value to them. example: -complex=1j To verify the type of any object in Python, use the type() function as print(type(variable)). example: – a=5 print(type(a)) You can convert from one type to another with the int(), float(), and complex() methods. example: – a=2 x=float(a) Mathematical functions: – Operators are used to perform operations on variables and values. Arithmetic operations are addition, subtraction, multiplication, division, modulus, exponential and floor division. addition: – The operator ‘+’ is used to add two numbers. subtraction: – The operator ‘-‘ is used to subtract two numbers. Multiplication: – The operator ‘*’ is used to multiply two numbers. division: – The operator ‘/’ is used to divide two numbers. Modulus: – The operator ‘%’ is used to find the remainder in division operation. Exponential operation: – (a**b) is used to find a to the power of b value. floor division:-(a//b) is dividing one number by another and then rounding the result to the closest integer that is smaller.
