Python Program to read two integer numbers and perform all arithmetic operations
In this article we will see python program to read two integer number and perform all arithmetic operation.
Lets see the code :-
#Python Program Read 2 integer numbers and performs all arithmetic operations a = int(input('Enter First number ')) b = int(input('Enter Second number ')) #perform arithmetic operations add = a + b dif = a - b mul = a * b div = a / b f_div = a // b power = a ** b r = a % b # output print('Sum of :',a ,' and ' ,b ,'is :',add) print('Difference of :',a ,' and ' ,b ,'is :',dif) print('Product of :',a ,' and ' ,b ,'is :',mul) print('Division of :',a ,' and ' ,b ,'is :',div) print('Floor Division of :',a ,' and ' ,b ,'is :',f_div) print('Exponent of :',a ,' and ' ,b ,'is :',power) print('Modulus of :',a ,' and ' ,b ,'is :',r)
OUTPUT :-
Enter First number 10 Enter Second number 3 Sum of : 10 and 3 is : 13 Difference of : 10 and 3 is : 7 Product of : 10 and 3 is : 30 Division of : 10 and 3 is : 3.3333333333333335 Floor Division of : 10 and 3 is : 3 Exponent of : 10 and 3 is : 1000 Modulus of : 10 and 3 is : 1