> ## Documentation Index
> Fetch the complete documentation index at: https://python4ai.codewithsiva.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Control flow

> Make your programs smart with decisions

## Making programs think

So far, your programs run top to bottom, executing every line. But real programs need to make decisions - "if this, then that".

Control flow is what makes programs intelligent!

## What you'll learn

<Card title="If statements" icon="code-branch" href="/control-flow/if-statements">
  Make decisions based on conditions
</Card>

## Real-world examples

Decision-making is everywhere:

* **ATM**: IF password correct, THEN allow access
* **Apps**: IF user clicks button, THEN perform action
* **Weather app**: IF temperature \< 0, THEN show snow icon
* **Games**: IF health = 0, THEN game over

## Prerequisites

Before starting this section, make sure you understand:

* Variables and data types
* Operators (especially comparison operators)
* Boolean values (True/False)

<Tip>
  Control flow is where programming gets fun! You'll start building programs that can actually make decisions and respond to different situations.
</Tip>

## Let's begin!

Start with the foundation of all program logic: if statements.

<Card title="If statements" icon="code-branch" href="/control-flow/if-statements">
  Learn to make decisions in code
</Card>
