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.


+17 votes
asked in CSC211_Winter2018 by (1 point)

1 Answer

+6 votes

It is easy to make your code redundant when returning or setting a boolean value, so you must be cautious. Because a boolean can exist in one of two states, "true" or "false", there are many occasions where you only need to write code that checks when the boolean is either true or false, not both. This is because if the boolean isn't true, it must be false, and vice versa.

answered by (1 point)