Making Calculator Using Python

# Making Calculator Using Python.....


print('Calculator')

def sum(a,b):
    s = a + b
    return s

def diff(a,b):
    d = a - b
    return d

def multi(a,b):
    m = a * b
    return m

def divide(a,b):
    d = a / b
    return d

def power(a,b):
    p = a ** b
    return p

a = int(input('Enter the 1st values: '))
b = int(input('Enter the 2nd values: '))
print('')
print('Sum of ur number...')
print('-->',sum(a,b))
print('')
print('Diff of ur number...')
print('-->',diff(a,b))
print('')
print('Multiplaction of ur number...')
print('-->',multi(a,b))
print('')
print('Product of ur number...')
print('-->',divide(a,b))
print('')
print('Power of ur number...')
print('-->',power(a,b))
print('')

Comments

Popular posts from this blog

Making Snake Game Using Python

Match (Switch) statement in python

Arithmetic Operators in python with example