Apparently everythings a syntax error


#1



Conditionals & Control flow: Mix & match


For some reason every time I submit my code it keeps coming back with a syntax errors that don't seem like actual syntax errors. i originally started with fairly complex Booleans at first but i ended up dumbing them down until i had what you see here and still I'm getting syntax errors. Maybe I just don't get Boolean logic as much as I do the rest of the exercises so far far. I dunno


# 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 = (4 == 4) and "Left" == "Left"

# Make me false!
bool_three = (10 == 10) not (10 == 11)

# Make me true!
bool_four = (5<=10) or (10 >= 20)

# Make me true!
bool_five = (5<6) and (10 > 6)


#2

Try removing all the parens, they are not needed.


#3

I tried that. Now "10" is a syntax error


#4

not is not aware of the operand to its left, which in your case raised the error.

and not

or not

Now it has an operator that expects it on the right, and it only modifies the expression.


#5

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