Python MCQs with answers Page - 29

Here, you will find a collection of MCQ questions on Python. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 832.27K Points
Coach

Q. Python supports _____________ types of control structures.

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 832.27K Points
Coach

Q. Which of the following are control structure in python?

  • (A) Selection
  • (B) Iteration
  • (C) Both of the above
  • (D) Sequential

A

Admin • 832.27K Points
Coach

Q. In programming, the concept of decision making or selection is implemented with the help of ___________ statement

  • (A) while loop
  • (B) for loop
  • (C) if..else
  • (D) None of the above

A

Admin • 832.27K Points
Coach

Q. Execution of statements in _________________ construct depend on a condition test.

  • (A) Selection
  • (B) Sequence
  • (C) Iteration
  • (D) Repetition

A

Admin • 832.27K Points
Coach

Q. Correct syntax of writing ‘simple if’ statement is _____

  • (A) if condition statements
  • (B) if (condition) statements
  • (C) if condition : statements
  • (D) if condition -- statements

A

Admin • 832.27K Points
Coach

Q. ______ statements can be written in if block.

  • (A) 2
  • (B) 4
  • (C) 10
  • (D) Any number of

A

Admin • 832.27K Points
Coach

Q. Which of the following is variant of conditional statement in Python?

  • (A) simple if without else
  • (B) if .. else
  • (C) if .. elif
  • (D) All of the above

A

Admin • 832.27K Points
Coach

Q. Number of elif in a program is dependent on the ___________

  • (A) number of conditions to be checked
  • (B) number of variables in a program
  • (C) number of loops in a program
  • (D) None of the above

A

Admin • 832.27K Points
Coach

Q. An ‘if’ condition inside another ‘if’ is called

  • (A) Second if
  • (B) nested if
  • (C) another if
  • (D) None of the above

A

Admin • 832.27K Points
Coach

Q. Leading whitespace (spaces and tabs) at the beginning of a statement is called _________________.

  • (A) indentation
  • (B) orientation
  • (C) Iteration
  • (D) None of the above

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ