Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+46 votes

I am confused why the initial boolean value impacts the returned boolean value even when the hour is the same.

asked in CSC285_Fall2018 by (1 point)

4 Answers

+24 votes

The boolean 'talking' describes if the parrot is making noise or not, so it does matter. If it is false and the parrot is not talking then the hour doesn't even matter. Only when 'talking' is true does the hour come into play.

answered by (1 point)
+22 votes

It depends on whether the parrot is talking because if the parrot is talking, then you could be in trouble depending on the hour. You can be in the hours where you could be in trouble, but if the parrot is not talking, you are not in trouble. Don't forget your boolean operators!

answered by (1 point)
+20 votes

The initial Boolean value is important because it tells you if the parrot is talking or not. If it's before 7 and after 20 and the parrot is not talking then you are not in trouble. If it's in the range of those hours and the parrot is talking, then you are in trouble.

answered by (1 point)
+20 votes

I think the returned value should both depends on the hour and the boolean value "talking"

answered by (1 point)