Help I'm getting an error (Now Solved)


#1



Exercise 10/15

It keeps on saying this error message:
Oops, try again. Make sure you have a value for all 5 variables!

I expected my code to run perfectly instead it did not, plus can someone please explain to me about using the 'not' boolean operator, its kinda tricky for me to understand the not keyword?


# 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 = (9 >= 7) and "Can" == "Can"

# Make me false!
bool_three = (34 < 32) and "Nay" == "Sp"

# Make me true!
bool_four = (81**1 == 9**2) not "v" == "r

# Make me true!
bool_five = (81**1 == 9**2) or "N" == "n"


#2

This line line will present an error due to the incorrect use of the not operator. The first three lines are okay but bool_five is coming out as a comment.


#3

The not operator will be explained later on and is normally used for more complex pieces of code.


#4

same line (bool_four), check the quotation marks ("), there are a odd number of them, which is a bit of a problem


#5

I used quotation marks for the letter "r" in bool four now.

It still doesn't work, there keeps on being the error message and l don't get how do you use the not operator in a boolean expression, can you give an example on it and an example for the 'or' expression as well as 'and' expression.

Never mind now, l went back to exercise 8/10 on how to use a not operator, this code now works.
Thanks for indicating the errors for me.

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 = (9 >= 7) and "Can" == "Can"

Make me false!

bool_three = (34 < 32) and "Nay" == "Sp"

Make me true!

bool_four = not "v" == "r"

Make me true!

bool_five = (9 * 1 == 9) or "N" == "n"


#6

Is bool five now okay?

bool_five = (9 * 1 == 9) or "N" == "n"


#7

Yes that is a true statement