Chapter 6 Flow of Control
Chapter 6 Flow of Control
Selection
Repetition
Output:
Enter first number 5
Python does not use {} or other markers for blocks of code. It relies on
indentation to understand the structure of the program.
Example
if True:
print("Hello") # Indented: Part of the 'if' block
print("World") # Indented: Still part of the 'if' block
print("Outside") # Not indented: Outside the 'if' block