What is the expected behavior of the following code''
def f(n):
for i in range{1, n+1): yield i
print(f(2))
It will;
Answer : B
What is the expected behavior of the following snippet9
def x() : # line 01
return 2 f line 02
x = 1 + x() # line 03
print(x) f# line 04
It will:
Answer : D
What is the expected output of the following code?
def f(n): *
if n = =1:
return '1' return str(n) + f(n-1)
print(f(2))
Answer : C
What is the expected output of the following code?
str = 'abcdef de f fun(s): del s[2]
return s
print(fun(str) )
Answer : B
Which of the following statements are true? (Select two answers)
Answer : A, D
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)
a = [0] b = a&=]
MO] = 1
Answer : B