Python MCQ Questions and Answers 2021-22 Sample Paper 2
Python MCQ Questions and Answers 2021-22 Sample Paper 2
com
a. none
b. address
c. Name
d. pass
a. list
b. tuple
c. dictionary
d. string
a. (40,50,60,70,80)
b. (40,50,60,70)
c. [40,60]
d. (40,60)
d. (40,60)
a. myfile.read()
b. myfile.read(n)
c. myfile.readline()
d. myfile.readlines()
i. myfile = open('student.txt','rb')
ii. myfile = open('student.txt','w')
iii. myfile = open('student.txt','r')
iv. myfile = open('student.txt')
a. only i
b. both i and iv
c. both iii and iv
d. both i and iii
a. string
b. integer
c. list
d. tuple
a. +
b. in
c. *
d. /
a. print(tup1[2])
b. tup1[2] = 20
c. print(min(tup1))
d. print(len(tup1))
a. 0
b. 1
c. 2
d. 3
a. Function Name
b. Return Statement
c. Parameter List
d. Both a and c
a. my_func()
b. def my_func()
c. return my_func
d. call my_func()
a. (colon) :
b. (hyphen) -
c. (comma) ,
d. (vertical line) |
a. read()
b. reader()
c. writer()
d. writerow()
a. .exe
b. .python
c. .py
d. .p
a. /
b. /*
c. //
d. #