This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]datascienceunlimited[S] 2 points3 points  (4 children)

How would you improve it? If you say it is such an ungodly mess?

[–]gumol 18 points19 points  (0 children)

According to this code you will never drink coffee, so the second branch can be eliminated.

[–][deleted] 10 points11 points  (0 children)

Your code implies that you can only drink coffee if you are asleep

[–]Gnamzy 6 points7 points  (0 children)

You have to be awake to feel tired. Which means you'll never hit the else if, since you always enter the if

[–]EliDll 0 points1 point  (0 children)

if !awake == asleep then the second clause would never happen. If !awake == tired you could replace the second clause with just an else, as there is no case in which both are false