We can perform all types of calculation and Comparison in Python.
Expression are used to perform calculations in Python.
Expression – Combination of Numbers and Operator. Operator Decides the type of calculation performed by the Expression.
Types of Operator:
- Arithmetic Operator
- Comparison Operator
- Logical Operator
Arithmetic Operator – Performs the simple Mathematical Calculation.
# Accept nos from user and find its sum
x=int(input(‘Enter a number : ‘))
y=int(input(‘Enter a number1 : ‘))
print(‘Sum is =’, sum)
Like Addition, Subtraction, Multiplication and Division can be performed.
Win Corporate Training