Please help - (brand new to python)


#1




Error message as below:

File "python", line 13
bool_four = (2 < 3) not (3 < 2)
^
SyntaxError: invalid syntax


Hello all, so sorry, but I'm sort of stuck at this point because I'm not sure what I'm doing wrong... please may someone point me in the right direction?


# Make me true!
bool_two = (4 == 4) and "Alpha" == "Alpha"

# Make me false!
bool_three = (3 < 2) and "Alpha" == "Alpha"

# Make me true!
bool_four = (2 < 3) not (3 < 2)

# Make me true!
bool_five = (3 == 3) or (4 == 4).


#2

here:

bool_four = (2 < 3) not (3 < 2)

not what? you cannot use the not keyword standalone like that


#3

Ah! It worked! Thank you so much!
So 'not' has to be paired with 'and'?


#4

not can also be paired with or. (and more, which you will learn later)

not simply will make an expression/condition from true to false or vice versa. But it can not be used like and and or, to compare multiply conditions


#5

Understood - thank you again!


#6

not can be fun:

not True == False

is this condition true or false? If you get it right, you understand not correctly :slight_smile:


#7

Condition is true?
Because it's correct that if something is not true then it's false?


#8

very good :slight_smile:


#9

:smiley:
I'm getting there, slowly but surely.


#10

slowly but steadily is the best approach :slight_smile:


#11

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