Operators and Expressions in Python
18 February 2025

Operators and Expressions
1.What are operators?
Operators are symbols that perform operations on variables and values. They are used to form expressions, which are evaluated to produce results.
2.Types of operators
1.Arithmetic Operators
These operators perform mathematical calculations:
•+(Addition):10+3=13
•-(Subtraction): 10-3=7
•*(Multiplication):10*3=30
•/(Floor Divison):10//3=3
•%(Modulus, remainder):10%3=1
•**(Exponentiation):10**3=1000
Example :
a, b = 10, 3
print(a + b) # 13
print(a ** b) # 1000
2.Comparison Operators
These operators compare values and return True and Flase.
•==(Equal to): 10==5→False
•!=(Not equal to):