Someone is doing well if they are getting enough sleep and also keeping up
with their schoolwork. Write an expression that expresses whether someone is
doing well given two boolean values enoughSleep
and keepingUp
.
Someone is feeling energetic if they are getting enough sleep and aren't
exhausted from having just worked out. Write an expression that expresses
whether someone is energetic given two boolean
values enoughSleep
and justWorkedOut
.
Someone is really dragging if they haven’t gotten enough sleep and have lots
of work to do. Write an expression that says whether someone is dragging,
given two boolean values enoughSleep
and lotsOfWork
.
Someone is super beat if they haven’t gotten enough sleep and haven’t had
enough to eat. Write an expression that says whether someone is super beat
given two boolean values enoughSleep
and eatenEnough
.
Roughly speaking, someone can go to Senior Prom if they are a senior or if
they are invited by a senior. Write an expression that says whether someone
can go to prom given the two boolean values isSenior
and invitedBySenior
. (In a later problem set we’ll deal with
the more complex reality of the prom exclusion list.)
If someone is working on something for their own reasons they don’t need to
keep going if it’s not fun any more. So they will stop when they’re done or
when it’s not fun anymore. Write an expression that says whether they should
stop given the two boolean values done
and fun
.
Someeone is working on something and aren’t that into it so they’ll quit if
it’s not fun. And even if it is fun but they’re feeling tired they’ll also
call it quits. Write an expression that says whether they’ll stop given the
two boolean values fun
and tired
.
Someone is unable to go to sleep unless it’s totally dark. Also they
obviously can’t sleep when they’re not sleepy. Write an expression that says
whether they’re awake given the boolean values sleepy
and dark
.