code-playpad

Conditions

Second section page. Navigating between Loops and Conditions costs one fetch and a <main> swap — no runtime re-initialisation, which is the ~1–3s that would otherwise repeat on every navigation.

if / elif / else

score = 78 if score >= 90: grade = "A" elif score >= 80: grade = "B" elif score >= 70: grade = "C" else: grade = "F" print(grade)

Read-only example

Reference snippets can be runnable without being editable.

print("truthy" if [0] else "falsy") print("truthy" if [] else "falsy")
Completed: