Skip to content
AgileLogics
3 min read

Conditional Statements

Prerequisites: Operators

A conditional statement runs a block of code only if a condition evaluates to True.

temperature = 30

if temperature > 25:
    print("It's warm")

The condition (temperature > 25) must produce a boolean — the block underneath only runs when that boolean is True.