CH 2 Functions
CH 2 Functions
CH 2 Functions
Chapter 2- Functions
17 Rewrite the following code in Python after removing all syntax error(s). Underline each
correction done in the code.
def Tot(Number) #Method to find Total
Sum=0
for C in Range (1, Number+1):
Sum+=C
RETURN Sum
print (Tot[3]) #Function Call
18 Differentiate between actual parameter(s) and a formal parameter(s) with a suitable example
for each.
19 Explain the use of global keyword used in a function with the help of a suitable example.
20 What will be the output of the following code?
def find(var1=10, var2=20):
var1+=1
var2 = var2 - 2
return var1+var2
print(find(30),find())