Start learning →
Home › Olympiad (Class 10) › Computer Science › Booleans and Decisions › In a Python if statement, the body runs only whe…

In a Python if statement, the body runs only when the condition is:

ATrue
BLong
CTyped
DEmpty
Answer & Solution
Correct answer: A. True
1. The condition is checked before the body. 2. A false condition skips the body entirely. 3. So the body runs when the condition is True. _Source: OpenStax Introduction to Python Programming, Chapter 4._
Practise this question with Quill — Olympiad (Class 10) →
Related questions