addition and subtraction by uesing function
THE PROGRAM IS -
# Online Python - IDE, Editor, Compiler, Interpreter
def sum(a, b):
return (a + b)
a = int(input('Enter 1st number: '))
b = int(input('Enter 2nd number: '))
print(f'Sum of {a} and {b} is {sum(a, b)}')
def result(c,d):
return (c-d)
c=int(input("ente 1st number "))
d=int (input ("enter the second number "))
print(f'sum of {c} and {d} is {result (c,d)}')
THE RESULT IS -
Enter 1st number:
23
Enter 2nd number:
25
Sum of 23 and 25 is 48
ente 1st number
23
enter the second number
13
sum of 23 and 13 is 10
Comments
Post a Comment