Functions Program based Question
Functions Program based Question
2.What are the errors in following codes ? Correct the code and predict
output :
def Tot(Number) #Method to find Total
Sum = 0
for C in Range (1, Number + 1):
Sum += C
RETURN Sum
print (Tot[3]) #Function Calls
print (Tot[6])
print(alpha("Valentine's Day"):)
print(beta(string = 'true'))
print(alpha(n = 5, "Good-bye"):)
10.In the following code, which variables are in the same scope ?
def func1():
a = 1
b = 2
def func2():
c = 3
d = 4
e = 5