← All practice pages

Python

Python Conditionals

Conditionals let a program choose between paths using if, elif and else. Each branch runs only when its condition is true.

Try it now

Build a number guessing game where the computer picks a random number 1-100 and gives "higher/lower" hints. Track attempts and display stats.

Create a free account to run your answer and get ARIA's review.