test python quiz 0 12345678910 Python Quiz - 001 This quiz is to test your knowledge on Python programming 1 / 10 What is the output of the following code snippet? List_1 = [[1,1,1],[2,2,2],[3,3,3]] List_2 = copy.deepcopy(List_1) List_1.append([4,4,4]) print(List2) [[1,1,1],[2,2,2],[3,3,3],[4,4,4]] [[1,1,1],[2,2,2],[3,3,3]] [[1,1,1],[4,4,4]] [[4,4,4],[1,1,1],[2,2,2],[3,3,3]] 2 / 10 Which is not a built-in data type in Python? Sets Lists Arrays Tuples 3 / 10 Which of the following statements is correct ? Python doesnot allow have any capitalised keywords All keywords are in python are small letters. None of these None, True and False are the only capitalise keywords in python. 4 / 10 What is the output of the following statement? l = [1,2,3] l.append([4,5]) print(l) [] [1,2,3,[4,5]] [4,5] [1,2,3,4,5] 5 / 10 What is the return value of the function id()? Returns an integer id of the object The memory address of the object Size of the object Identifier mapped to specified object 6 / 10 What is the output of the follow statement? max(0,min(True,1.0))) True 0 False 1 7 / 10 What is the output of this code snippet? l=[[1 ,0, 1], [0, 1, 0], [1, 0, 1]] print([[row[i] for row in l] for i in range(2)]) [[1, 1, 1], [1, 1, 1]] [[0, 1, 0], [1, 0, 1]] [[0, 0, 0], [1, 1, 1]] [[1, 0, 1], [0, 1, 0]] 8 / 10 If dict is a dictionary, what will be the output of the following statement? for i in dict: print i Throws an error prints all keys prints all values prints all key, value pairs 9 / 10 What is the output of the following statement? l = [1,2,3] l.extend([4,5]) print(l) [1,2,3,4,5] Error [4,5] [] 10 / 10 What is the output of the following statement? import copy a = [1,2,3] b = copy.copy(a) a.append(4) print(b) [1,2,3,4] [] [4] [1,2,3] Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz