Wednesday, 13 May 2015

Python program for performing Arithematic Operations


This is basic python program for all starters. It simply takes two integer numbers adds , subtracts , multiples and divides them.





PROGRAM :
num1 = int(input('Enter First number: '))
num2 = int(input('Enter Second number '))
add = num1 + num2
dif = num1 - num2
mul = num1 * num2
div = num1 / num2
print('Sum of ' ,num1 ,'and' ,num2 ,'is :',add)
print('Difference of ',num1 ,'and' ,num2 ,'is :',dif)
print('Product of' ,num1 ,'and' ,num2 ,'is :',mul)
print('Division of ',num1 ,'and' ,num2 ,'is :',div)



OUTPUT : 
Python  - Arithematic Operations




Similar Programs :
C program for performing Arithematic Operations
Cpp program for performing Arithematic Operations
Java program for performing Arithematic Operations