Setting Boolean 'tricky'


#1

Continuing the discussion from Question 11- Conditionals and Conditions Flow:

In the console, I am unable to set boolean tricky to the expression, which evaluates to 'false'. I should be able to. Just setting boolean tricky to false is the only method that gets part one of the instructions to work, however, I should have been able to assign the expression to the variable and I was not.


#2

What you describe suggests that your code was doing something different from your intention.

You essentially describe the problem as "did not work", but if you consider what happened instead of the desired result, that might say a lot about what you need to change. For example, if the expression doesn't evaluate to a bool ean after all, then you would get an error message from the compiler saying that this other type could not be assigned to your variable because of differing types.


#3

Thanks. My stupid self had to think about that for a while before I finally got it.


#4

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).

I guess this was your problem too, I didn't really understand what I have to do from the instructions or from Ionatan user. Can you give me some help? Thanks a lot!


#5

Please insert entire code here.

I am LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSt


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.