Top 50+ Solved Python MCQ Questions Answer
From 1 to 10 of 10
Q. To read the entire remaining contents of the file as a string from a file object infile, we use ____________
a. infile.readall()
b. infile.read()
c. infile.readlines()
d. infile.read(all)
Q. To access value in tuple, use the ________ bracket for slicing along with the index.
a. square
b. round
c. not necessary
d. triangle
Q. What is a variable defined inside a function referred to as?
a. static variable
b. global variable
c. local variable
d. automatic variable
Q. What is the output for the following code:languages = ["java", "c++", "python"]for x in languages :if x == "c++":continueprint(x)
a. java
b. javapython
c. javac++python
d. c++python
Q. Which geometry manager organizes widgets in blocks before placing them in the parent widget.
a. position()
b. grid()
c. pack()
d. place()
Q. Through Which Geometry method we can organizes widgets in a table-like structure in the parent widget.
a. position()
b. grid()
c. pack()
d. place()
- 1 (current)