What is the output when following code is executed ? >>>names = ['Amir', 'Bear', 'Charlton', 'Daman'] >>>print(names[-1][-1]) a) A b) Daman c) Error d) n Answer : b) Daman...
What is the output when following code is executed ? names1 = ['Amir', 'Bear', 'Charlton', 'Daman'] names2 = names1 names3 = names1[:] names2[0] = 'Alice' names3[1] = 'Bob' sum = 0 for ls in (names1, names2, names3): ... if ls[1] == 'Bob': sum += 10 print sum a) 11 b) 12 c) 21 d) 22 Answer : d) 22...
hat is the output when following code is executed ? >>>print r"\nhello" The output is a) a new line and hello b) \nhello c) the letter r and then hello d) error Answer : d) error...
What is the output of the following code? >>> a=(1,2,(4,5)) >>> b=(1,2,(3,4)) >>> a Answer : a) False...
What is the output of the following? i = 1 Page No 11 while True: if i%3 == 0: break print(i) i + = 1 a) 1 2 b) 1 2 3 c) error d) none of the mentioned Answer : c) error...
50.5k questions
47.1k answers
240 comments
7.0k users