Question: Observe the following Python code: def a(n): if n == 0: return 0 else: return n'an def ban, tot): if n == : return tot


Observe the following Python code: def a(n): if n == 0: return 0 else: return n'an def ban, tot): if n == : return tot else: return b(n-2, tot-2) 1) Select one: a. bo is tail recursive but a0 isn't b. Both a() and bl aren't tail recursive O c. a() is tail recursive but bo isn't d. Both al) and b are tail recursive What will be the output of the following Python code? == 1: def a(n): if n == 0: return elif n return 1 else: return a(n-1)+a(n-2) for i in range(0,5): print(a(i), end=" ") Select one: a. 01123 b. 0112 C. 0123 d. 011235 Find the output of the following code: temp dict() temp['keyi'] {"key1' : 44, 'key2 : 566} temp['key2'] = [1, 2, 3, 4] for (key, values) in temp.items(): print(values, end = " ") Select one: O a. {"key1:44 'key2 : 566) [1, 2, 3, 4] b. Runtime error C. {"key1: 44, 'key2': [1, 2, 3, 4]} d. Name Error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
