Python-Mid1-IMP ObjectiveQuestions
Python-Mid1-IMP ObjectiveQuestions
[D ]
A) Object Oriented B) Structured Programming C) Functional Programming D) all the above
5. What will be the output of the following function? len([5, 7, 3,”hello”, True])
[C ]
A) 2 B) 4 C) 5 D) 3
7. Which of the following Python statements will result in the output: 6? A=[[1,2,3],[4,5,6][7,8,9] [B ]
A) A[2][2] B) A[1][2]
C) A[2][1] D) A[1][1]
9. To read the next line of the file from a file object fp, we use [B ]
A) fp.read() B) fp.readline() C) fp.read(10) D) fp.readlines()
14. Which method is used to get the dictionary keys python dictionaykeys
15. What will be the output of the python code? Print(r”\nHello ‘student’”) __/n hello 'stidents'_________
18. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1) __3,5,20,5,2,1,3____________