18. Passing Parameters to function
def fun1(a):
print(a)
b=int(input(“Enter a number”))
fun1(b) Output
depends on input
19. Passing Parameters to function
def fun1(a):
print(a)
b=input(“Enter name”)
fun1(b) Output
depends on input
20. Passing Parameters to function
def fun1(a):
print(a)
b=input(“Enter name”)
fun1(b) Output
depends on input
21. Passing Parameters to function
def fun1(a):
print(“ Hello ”, a)
b=input(“Enter name”)
fun1(b) Output
depends on input
22. Passing Parameters to function
def fun1(d,e):
print(d+e)
b=int(input("Enter a number "))
c=int(input("Enter another number
"))
fun1(b,c)
23. Passing Parameters to function
def fun2(g):
print(g)
def fun1(d,e):
f=d+e
fun2(f)
b=int(input("Enter a number "))
c=int(input("Enter another number
"))
fun1(b,c)
24. def b(j):
print("sum is ",j)
def a(f,g):
h=f+g
b(h)
def k():
c=int(input("enter number "))
d=int(input("enter number "))
a(c,d)
k()
25. Returning values by the function
def fun2(g):
h=g*g
return h
b=int(input("Enter a number "))
c=fun2(b)
print(c)
26. Returning values by the function
def fun2():
b=int(input("Enter a number "))
h=b*b
return h
c=fun2()
print(c)
27. Returning values by the function
def fun2():
b=int(input("Enter a number "))
return b*b
c=fun2()
print(c)