Python Program to perform all arithmetic operations on two integers

0
71
num1=int(input("Enter first number: "))
num2=int(input("Enter second number: "))

num3=num1+num2;     # sum of two numbers and num3 for store result  
print("\n Addition of" ,num1, "and" ,num2, "=", num3);

num3=num1-num2;     # difference of two numbers
print("\n Difference of" ,num1, "and" ,num2, "=", num3);

num3=num1*num2;      # product of two numbers 
print("\n Product of" ,num1, "and" ,num2, "=", num3);

num3=num1/num2;       # quiescent of two numbers 
print("\n Quiescent of" ,num1, "divided by" ,num2, "=", num3);

num3=num1%num2;        # remainder of two numbers 
print("\n Remainder after dividing " ,num1, "by" ,num2, "=", num3);

    Output:
    Enter first number: 20
    Enter second number: 5
    Addition of 20 and 5 = 25
    Difference of 20 and 5 = 15
    Product of 20 and 5 = 100
    Quiescent of 20 divided by 5 = 4.0
    Remainder after dividing 20 by 5 = 0

 

 

 

Python Program to perform all arithmetic operations on two integers write a python program to perform all arithmetic operations on two integers python program to perform all arithmetic operations on two given numbers all arithmetic operation program in python write a program all arithmetic operations in python arithmetic operation program in python

LEAVE A REPLY

Please enter your comment!
Please enter your name here