Class Test Function
Class Test Function
Class Test Function
XII(2020-21) COMPUTERSCIENCE(083)
CLASS TEST(Functions)
3. Which of the following argument worked with implicit value that are used if no value is
provided?
i) keyboard ii) required iii) variable length iv) default
x=50
def func(x):
x=2
func(x)
print(‘x is now’,x)
I) x is now 50 ii) x is now 2 iii) X is now 100 iv) Error
Q11. from the program code given below identify the part mentioned below : (3)
def processNumber(x):
x=72
return x+3
y=54
res=processNumber(y)
identify these parts: function header, function call, arguments ,parameters, function body. main
program
Q12. Write a function that take positive integer and return’s one’s position digit of the integer (3)
Q13. Differentiate between call by value and call by reference with a suitable example for each. (2)
Q14. Write a function LMove(Lst,n) in Python, which accepts a list Lst of numbers and n is a
numeric value by which all elements of the list are shifted to left.
Sample Input Data of the list
Lst= [ 10,20,30,40,12,11], n=2
Output Lst = [30,40,12,11,10,20] (3)