Python MCQ Quiz Hub

MCQ on Flow of Control in Python Set 1

Choose a topic to test your knowledge and improve your Python skills

Python executes one statement after another from beginning to the end of the program. This is a __





✅ Correct Answer: 1

The order of execution of the statements in a program is known as ___





✅ Correct Answer: 1

Python supports _____________ types of control structures





✅ Correct Answer: 2

Which of the following are control structure in python?





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 1

Correct syntax of writing ‘simple if’ statement is _____





✅ Correct Answer: 2

_____ statements can be written in if block.





✅ Correct Answer: 4

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





✅ Correct Answer: 3

Number of elif in a program is dependent on the _____





✅ Correct Answer: 1

An ‘if’ condition inside another ‘if’ is called ___ a.





✅ Correct Answer: 2

Leading whitespace (spaces and tabs) at the beginning of a statement is called _______





✅ Correct Answer: 1

Write the output of the following code : if True: print("Hello") else: print("Bye")





✅ Correct Answer: 2

Write the output of the following code : y=2 if 2!=y: print("H") else : print("K")





✅ Correct Answer: 2

__ is an empty statement in Python.





✅ Correct Answer: 4

Which of the following statement is not assigning a numerical value 8 to variable X, if original value of X is 0? ?





✅ Correct Answer: 3

Write the output of the following : x = 10 if x > 7: print("Hello") print("Bye")





✅ Correct Answer: 4

A statement inside ‘if’ has an indentation of _________ space





✅ Correct Answer: 2

Ravi wants to display “Hello”, if the condition is True, otherwise, “Pass” if the condition is False. Which of the following help to implement the same?





✅ Correct Answer: 1

Ram wants to create a program to check whether an year is leap year or not. For this he should have a good understanding of __________





✅ Correct Answer: 1

if-elif statement is used in situation which involves ____________





✅ Correct Answer: 1

What is the purpose of ‘else’ statement in if-elif ladder?





✅ Correct Answer: 1

Number of elif in if-elif ladder depends on _





✅ Correct Answer: 1

A graphical representation that shows step by step solution to solve a given problem is __





✅ Correct Answer: 2

Which of the following is not a keyword in Python?





✅ Correct Answer: 4