Need 11. Generalizations help!


#1

The instructions:
Use the precedence rules to help you evaluate the Boolean expression in the single line comment above the tricky variable.
Then, set the boolean variable tricky equal to the result (either true or false).

// ( 3 >= 3 && !(true || true) )
boolean tricky = false || true;

^^^^ the bottom part is right! but the top line is wrong and I don't know what to do


#2

I'm not sure what you mean by the bottom part and the top part.

If, by the top part, you mean this expression:

// ( 3 >= 3 && !(true || true) )

then, it isn't right or wrong, it is just an expression that you are being asked to evaluate. The exercise wants you to work out its value. Does it work out to be true or does it work out to be false?

Once you work out that expression, then you take your answer, either true or false, not both, or some combination of the two, and assign that value to the variable tricky.


#3

I figured it out, thank you!


#5

A post was split to a new topic: 11. Generalizations


#6

2 posts were split to a new topic: 11. "you take your answer" and "assign that value" how to do that?


#8

Hello I am Khin Su Mon from Myanmar. I stuck in this problem and I got it right now.Thanks for explaining it.


#9

Can someone show me how to do the 1st Instruction?

  1. Use the precedence rules to help you evaluate the Boolean expression in the single line comment above the tricky variable.
    Then, set the boolean variable tricky equal to the result (either true or false).

Thankyouu :slightly_smiling:


#10

This is how I completed mine:

All the first part is asking is to determine if the expression is false or true, then set that value to the variable tricky.


#11