def fun (a, b, c=0) : - ANSWER-fun (
2. What is the output of the following snippet?
list = [x * x for x in range (5) ]
def fun (1st) : del 1st [1st [2] ] return 1st
print (fun (list) ) - ANSWER-[ ]
3. How many elements does the 1st list contain?
1st = [i for i in range (-1, -2) ] - ANSWER-One, Two, Three, Zero
4. What is the output of the following snippet?
dct = {}
dct [ '1' ] = (1, 2)
dct [ '2' ] = (2, 1)
for x in dct.keys () : print (dct [x] [1] ,enf="") - ANSWER-12 or (1,2) or 21 or (2,1)
5. Assuming that the "tuple" is a correctly created tuple, the fact that tuples are immutable means that the following instruction:
tuple [1] = tuple [0] - ANSWER-
6. The following snippet:
def func(a, b) : return b ** a print (func (b=2, 2) ) - ANSWER-
7. What is the output of the following piece of code?
print ("a", "b", "c", sep="sep") - ANSWER-
8. An operator able to check whether two values are not equal is coded as: - ANSWER-
9. What is the output of the following snippet?
dct = { 'one' : 'two', 'three' : 'one, 'two' : 'three' }
v =v dct ['three'] for k in range (len(dct) ) : v = dct [v]