Flow of Control Quiz 2

Share with others

Welcome to your Flow of Control Quiz 2

Q11. An 'if' condition inside another 'if' is called _______________

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

Q13. Write the output of the following code :

if True:
print("Hello")
else:
print("Bye")

Q14. Write the output of the following code :

y=2
if 2!=y:
print("H")
else :
print("K")

Q15. ________________ is an empty statement in Python.

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

Q17. Write the output of the following :

x = 10
if x > 7:
print("Hello")
print("Bye")

Q18. A statement inside 'if' has an indentation of ______________ spaces.

Q19. 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?

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


Share with others

Leave a Reply

error: Content is protected !!