KnowledgeBoat Logo
|

Informatics Practices

What does the following code print to console?

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

Python Control Flow

4 Likes

Answer

101

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

Answered By

1 Like


Related Questions