Add Parentheses (Exercise)
Let’s do one more logic exercise just to keep warming up and train your comparator and logical operator muscles. This one here says, “Add parentheses where necessary so that each of the following expressions evaluates to
True.” So again, we want to make sure that each of those three expressions evaluates to
And we’ve got one that says
False == not True,
True and False == True and False, and
and "A" == "B", and you’ll have to add parentheses to make sure that they actually evaluate to
True. I’ll try that out in the next lesson in the interactive window, but go ahead and try it out by yourself.
Become a Member to join the conversation.