Infinite Loop

Domain: Programming Fundamentals

🎯 Motivation

A loop that never ends because its condition never becomes false. Usually a bug, but sometimes intentional (servers).

πŸ“‹ Concrete Example

while True: print('forever') never stops. while x > 0: x += 1 (if x starts positive) - x keeps growing, condition stays true.

πŸ”— Analogy

A hamster wheel - the hamster keeps running and the wheel keeps spinning. There’s no exit condition. Sometimes useful (generating power), often a trap.