Why am I getting an error?



It says, File "python", line 13
bool_four = True and True
SyntaxError: invalid syntax

Also, when I take out line 13, it gives the same error code for line 16

Here's the code I type:

Use boolean expressions as appropriate on the lines below!

Make me false!

bool_one = (2 <= 2) and "Alpha" == "Bravo" # We did this one for you!

Make me true!

bool_two = not 10 != 9 and False

Make me false!

bool_three = len ("Helloo") == len("Alyssa)" or 9 == 5

Make me true!

bool_four = True and True

Make me true!

bool_five = False or True


Did you mean?...


My thought is the end quote is misplaced so that puts the closing ")" inside the string. Everything after this point (beginning at line 13?) might be getting included in the "len()" method, giving errors after that point.


That is the incorrect syntax.

The " should be inside, for example ("Hello").


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