Back
+10 XP
Concept

Logical or (At Least One True)

Use `or` when meeting just one requirement is good enough:

python
is_admin = False
is_mod = True
if is_admin or is_mod:
    print("Welcome")

# 48. Logical or (At Least One True) Use `or` when meeting just one requirement is good enough: ```python is_admin = False is_mod = True if is_admin or is_mod: print("Welcome") ``` An `or` check only fails if **both** sides are completely `False`. If either side is `True`, it passes.

Checkpoint

When does `x or y` evaluate to `False`?

Practice

Write an `if` checking if `is_weekend or is_holiday` for `is_weekend = False` and `is_holiday = True`. If true, print `"Sleep in"`.

Terminal
01
Tap code blocks below to assemble
Available Blocks