slip test - functions outputbased
slip test - functions outputbased
SECTION – B
5. What will be the output of following 2 B=30
code? A = Updater(A,B)
def Alter(M,N=50): print(A,'#',B)
M=M+N B = Updater(B)
N=M-N print(A,'#',B)
print(M,"@",N) A = Updater(A)
return M print(A,'$',B)
A=200 7. What will be the output of following 2
B=100 code?
A = Alter(A,B) def Fun1(mylist):
print(A,"#",B) for i in range(len(mylist)):
B = Alter(B) if mylist[i]%2==0:
print(A,‟@‟,B) mylist[i]/=2
6. What will be the output of 2 else:
following code? mylist[i]*=2
def Updater(A,B=5):
A = A // B list1 =[21,20,6,7,9,18,100,50,13]
B=A%B Fun1(list1) print(list1)
print(A,'$',B)
return A + B
A=100
*****************ALL THE BEST******************