In this video, I have covered how to use numbers like integers, floats and performed basic Arithmetic operators and covered various operators with examples.

NUMBERS AND OPERATORS

Numbers are normal operand values which are used to perform set of task or operations using an operator. Numbers can be integers, decimal value, etc.

There are many operators in Python. Some of them are listed below:

1) Arithmetic operators

2) Comparison operators

3) Logical operators

4) Bitwise operators

5) Assignment operators

In this blog we will see about Arithmetic operators and understand how to use it with Python IDLE to perform certain calculations.

PYTHON ARITHMETIC OPERATORS

OPERATORDESCRIPTIONEXAMPLE
Addition (+)Adds two values5+6 = 11
Subtraction (-)Subtracts5-3 = 2
Multiplication (*)Multiplies two values4*8 = 32
Division (/)Divide by right hand operand6/3 = 2
Modulus (%)Divides and gives the remainder6%3 = 0
Exponential (**)Performs power calculations on operand2**4 = 32
Double slash (//)Rounds the float to the nearest value integer.Positive case: Round to positive existing integerNegative case: Round towards negative infinity13//2 = 6-13//2 = -7

The priority or hierarchy of operators is defined using a standard rule of BODMAS which means Brackets, Division, Multiplication, Addition and Subtraction. In this priority a given equation with multiple operators can be solved.

Other operators will be explained in other blogs.