Flowcharts and Program Flow
Flowcharts use specific symbols to map out algorithms visually. Each shape has a purpose: process rectangles show instructions, parallelograms handle input/output, diamonds make decisions, and rounded rectangles mark the start and end.
The flow of a program follows three key patterns. Sequence determines the order of execution—simply following steps one after another. Selection introduces decision points that change the flow direction, typically using IF...ELSE statements to create different paths.
Iteration creates repetition through loops. You'll use FOR loops for definite iteration when you know exactly how many times to repeat (e.g., for count in range(10)). When you need to loop until a specific condition is met, you'll use WHILE loops for indefinite iteration (e.g., while userchoice != "x").
💡 Think of a flowchart as a map for your program—it shows all possible routes your code might take depending on different inputs and conditions.