Python Programs | IT Developer
IT Developer

Python Programs



Share with a Friend

Perform all arithmetic operations on two numbers - Python Program

a = int(input("Enter the first number: ")) b = int(input("Enter the second number: ")) print("Addition:", a + b) print("Subtraction:", a - b) print("Multiplication:", a * b) print("Division:", a / b) print("Floor Division:", a // b) print("Modulus:", a % b) print("Exponentiation:", a ** b)

Output

 
OUTPUT  :
Enter the first number: 10
Enter the second number: 3

Addition: 13
Subtraction: 7
Multiplication: 30
Division: 3.3333333333333335
Floor Division: 3
Modulus: 1
Exponentiation: 1000