python Last Checkpoint: 15 hours ago
File Edit View Run Kernel Settings Help Trusted
Code JupyterLab Python 3 (ipykernel)
[55]: #python program to add two numbers using function:
a= int(input("enter first number"))
b= int(input("enter second number"))
#functio definition
def summate(a,b):
c=a+b
print("The sum of two number is", c)
#function call
summate(a,b)
summate(9,10)
summate(a,b)
enter first number 3
enter second number 4
The sum of two number is 7
The sum of two number is 19
The sum of two number is 7
WAPP to three set of numbers from user and find their average . example: a+b=c d+e=f g+h=i average = (c+f+i)/3
[102]: def summate(a, b):
a= int(input("enter the a"))
b= int(input("enter the b"))
c= a+b
print("the sum of two number is",c)
return c
sum1 = summate(a, b)
sum2 = summate(a, b)
sum3 = summate(a, b)