CBSE Class 11 Computer Science Question 22 of 80

Conditional and Looping Constructs — Question 5

Back to all questions
5
Question

Question 5

What does the following code print to console?

if True:
   print (101) 
else:
   print (202)
  1. 101
  2. 202
  3. 303
  4. 102
Answer

101

Reason — In Python, if True: will always evaluate to True, so the code block under the if branch will execute.