Section 2 bool_four error


#1



Conditionals & Control Flow 2.Compare Closely



Am I supposed to use negative numbers differently?


Replace this line with your code. 
# Set this to True if -22 >= -18 or to False if it is not.
bool_four = True
bool_four == -22 >= -18
# Set this to True if 99 != (98 + 1) or to False otherwise.
bool_five = True
bool_five == 99 != (98 + 1)


#2

this comment:

# Set this to True if -22 >= -18 or to False if it is not.

what this means that if this condition is true, you set bool_four to true:

bool_four = True

otherwise, set bool_four to False:

bool_four = False

that is it, then you don't need this line:

bool_four == -22 >= -18

so all you have to do in this exercise: manually evaluate condition and set the variable to the right boolean value


#3

it's not an error, are you sure that -18 is less than -22 or it is the inverse


#4

Thank you, it seems I was thinking in a completely wrong direction.


#5

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