So far, your programs run every line in order. Line , then line , then line . But real programs need to make choices. Should I show this message? Should I calculate this value? Should I skip this step?
Conditional statements let your code branch. Based on some condition, you can run different blocks of code. If the user is logged in, show their dashboard. Otherwise, show the login page.
By the end of this section, you'll write programs that respond differently to different inputs. You'll use if, elif, and else to control program flow. This is where your programs start feeling intelligent.