Practice · Python

Practice Boolean Logic

Combine conditions with and/or/not and predict truth values, including short-circuit behavior.

Boolean Logicwarming python…

Junior Team Eligibility Checker

Write a function is_eligible(age, skill) that returns a boolean indicating whether a player can join the junior sports team.

Eligibility rules:

  • Age must be between 10 and 18 inclusive.
  • Skill level must be either "intermediate" or "advanced".

Return True only when both conditions are satisfied; otherwise return False.

Examples

is_eligible(12, "intermediate")  # → True
is_eligible(9, "advanced")       # → False (age too low)
Press Run to see output, or Check to grade against the tests.

Want a whole course built around boolean logic?

Start my path — free

Adaptive practice, streaks, projects with real code review. Free tier gates AI help, never content.