We want to go shopping but we obviously won’t if the store isn’t open. But
we’ll also wait for another day if the lines are too long. Write an
expression that says whether we’ll skip our planned shopping trip given the
two boolean values storeOpen
and linesTooLong
.
Now we want to go shopping, but only if the store is having a sale. As
before we obviously won’t go if the store isn’t open but we’ll also skip the
trip if the store isn’t having a sale. Write an expression using the two
boolean values storeOpen
and isASale
that says
whether we’ll hold off on our trip to the store.
The book club meets today. We’d expect someone to be at book club if they’re
a member as long as they’re not out sick from school. Write an expression
that says whether we expect someone to be at book club given the two boolean
values member
and outSick
.
The football team is very picky and will only allow people on the team who
are both fast and strong. Write an expression in terms of the two boolean
values fast
and strong
that says whether someone
has a chance to be on the team.
You’re on a camping trip and you’re trying to light a fire. Unfortunately
you’re having some trouble and are running out of matches. You’ll stop
trying when the fire is lit or when you run out of matches, whichever comes
first. Write an expressian that says whether you can stop trying using the
two boolean values fireLit
and haveMatches
.
It can be hard to pay attention if you’re distracted by being hungry. And
obviously it also hard to pay attention to things that you’re not interested
in. Write an expression that says whether you can pay attention to something
given the two boolean values hungry
and interested
.
A student should be in our classroom during our class only if they’re in the
class or are a student proctor. Write an expression that says whether a
student should be in the classroom during our class given the two boolean
values inTheClass
and isProctor
.
There’s a dark cave full of spiders. You should only go in if you’re not
afraid of the dark nor of spiders. Write a boolean expression using the two
values afraidOfTheDark
and afraidOfSpiders
that
says whether you could go into the cave.