The purpose of the lessons "And", "Or", "Not", etc


#1

Hello,

In regards to the lessons:
* And
* Or
* Not
* This and That (or This, But Not That!)

Is the exercise to copy exactly what the instructions show? Or are we suppose to create unique equations in their place?

Example

Instruction: "Set bool_three equal to the result of not 10 % 3 <= 10 % 2"

Do I type the following line?

bool_three = not 10 % 3 <= 10 % 2

Or do I make something up for my line, like?

bool_three = not 100**2 <= 5 * 0.25

(The above would be my unique equivalent to what the instruction suggested.)

Thank you for your time and assistance!!


#2

this would require you to manually evaluate the condition, and then set the result according. so lets say 10 % 3 <= 10 % 2 would evaluate to true, you would do:

bool_three = True

if the result would be false you would do:

bool_three = False

the only problem is that the exercise will approve it even if you just do:

bool_three =  10 % 3 <= 10 % 2

because the condition evaluate to the right boolen value


#3

Thank you for the clarification! That was a huge help. :slight_smile:


#4

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