Lesson 10 of 34
and, or, not: Combining Conditions
8 min 25 XP
and: True only if both sides are True. or: True if at least one side is True. not: flips True to False and False to True.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.A real example: to be eligible for a job, you need a degree and at least 60% marks.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.Python has a shortcut to check a range: 18 <= age <= 60