suggestions for you

6/recent/ticker-posts

HOW TO WRITE CALCULATOR IN PYTHON|AHMED 2 TECH

 HOW TO WRITE CALCULATOR IN PYTHON

 

copy this code

 

def addnum(a,b):
    c=a+b
    return  c
def subnum(a,b):
    c=a-b
    return  c
def mulnum(a,b):
    c=a*b
    return  c
def divnum(a,b):
    c=a/b
    return  c
num1=int(input('Enter your first number'))
num2=int(input('Enter your second number'))
print('Addition is',addnum(num1,num2))
print('Substraction is',subnum(num1,num2))
print('Multiplication is',mulnum(num1,num2))
print('Division is',divnum(num1,num2))
 
paste it in idle
 
now click run and save file
thanks!
 
 

Post a Comment

0 Comments