Okay, let's do some more practice with the control structures you've learned so far! We've seen how if
, elif
, and else
help our programs make decisions and choose different paths.
Engagement Message
What's the main job of these conditional statements?
Remember we also looked at combining checks using logical operators? and
requires both conditions to be true, while or
only needs one. not
reverses the truth value.
Engagement Message
When would a condition using and
evaluate to False
?
Type
Fill In The Blanks
Markdown With Blanks
Time for practice! Fill in the blanks to check if a person qualifies for a special discount: they must be over 60 or have a valid member card and not be on a restricted list.
Suggested Answers
- and
- or
- not
- ==
