9/1/26Less than 1 minuteAbout 103 words
Concept: if Statement
The if statement is the most fundamental control structure in any language.
As the diagram above illustrates, the if block evaluates a condition; if the condition is True, the block of code beneath it is executed. If it is False, that code block is skipped, and the program continues executing the code that follows.
if condition:
# This code runs only if condition is True
do_something()
# This code runs regardless of the condition