#Python program to do arithmetical operations
num1=input('enter number')
num2=input('enter number')
sum=int(num1)+int(num2)
sub=int(num1)-int(num2)
mul=int(num1)*int(num2)
div=int(num1)/int(num2)
exp=int(num1)**int(num2)
print('sum of {0} num1 {1} and num2 {2} '.format(sum,num1,num2))
print('subtract of {0} num1 {1}and num2 {2}'.format(sub,num1,num2))
print('multiplication of {0}num1 {1} and num2 {2}'.format(mul,num1,num2))
print('divison of {0} num1 {1}and num2 {2}'.format(div,num1,num2))
print('exp of {0} num1 {1} and num2 {2} '.format(exp,num1,num2))
No comments:
Post a Comment