I can't get bool_four right. I don't see anything wrong with it! Help



Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: invalid syntax (python, line 13)

File "python", line 13
bool_four = not (789 - 10 = 78.9 * 10) and (1024 > 2**9)
SyntaxError: invalid syntax

My answer should be correct. 789 -10 does not equal 78.9 *10, so this is False but will turn out True due to the not in front. 1024 is greater than 2 **9 so this is True and bool_four should be True. I've even copied what I put for bool_two (which it had no problems with), but it was still marked wrong in bool_four.

# Make me true!
bool_four = not (789 - 10 = 78.9 * 10) and (1024 > 2**9)


not (789 - 10 = 78.9 * 10)

we use = for assigment for checking whether two values equal or not we should use == or ===



Thanks for the reply, but it still doesn't work. I tried both == and === and it still won't let me through. Is there something wrong with the programme itself, not my code?


what is the error massage?did you try after refreshing your browser?


I've refreshed the browser now.
One message stayed the same (the one in the console) : File "python", line 13
bool_four = not (789 - 10 == 78.9 * 10) and (1024 > 2**9)
SyntaxError: invalid syntax

The one right underneath the code changed to: Oops, try again. Make sure you have a value for all 5 variables!

I still can't continue though.


I get the same thing but I get no syntax error... just to try again for bool_four


i can't see any error in your code.

try cut the whole code
then refresh your browser
then run the right code.

if you still get the error then post your code here



I completely reset the exercise and wrote a completely different code and it went through fine. Thank you :slight_smile:


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