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)

  • b. infile.read()

Q. To access value in tuple, use the ________ bracket for slicing along with the index.

a. square

b. round

c. not necessary

d. triangle

  • a. square

Q. What is a variable defined inside a function referred to as?

a. static variable

b. global variable

c. local variable

d. automatic variable

  • c. local variable

Q. Which of the following is mathematical function?

a. power

b. sqrt

c. add

d. sub

  • b. sqrt

Q. How many types of geometry manager classes?

a. three

b. two

c. four

d. one

  • a. three

Q. _____variable is shared by all instances of a class

a. class

b. instance

c. gloabal

d. local

  • a. class

Q. Which one of these is floor division

a. /

b. //

c. %

d. none

  • b. //
  • 1 (current)
Subscribe Now

Get All Updates & News