Conditionals and control flow


#1


Can someone help me with these, i am not shure what is wrong.


# Set this to True if 17 < 328 or to False if it is not.
bool_one = True == True  # We did this one for you!

# Set this to True if 100 == (2 * 50) or to False otherwise.
bool_two = True == True

# Set this to True if 19 <= 19 or to False if it is not.
bool_three = True == True 

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

# Set this to True if 99 != (98 + 1) or to False otherwise.
bool_five = False 







#2

This is how it looked like before i changed it :

# Assign True or False as appropriate on the lines below!

# Set this to True if 17 < 328 or to False if it is not.
bool_one = True   # We did this one for you!

# Set this to True if 100 == (2 * 50) or to False otherwise.
bool_two = 

# Set this to True if 19 <= 19 or to False if it is not.
bool_three = 

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

# Set this to True if 99 != (98 + 1) or to False otherwise.
bool_five =

#3

That differs from what I see in my lesson:

# Set this to True if 17 < 328 or to False if it is not.
bool_one = True   # We did this one for you!

In the second one, 100 == (2 * 50), ask yourself, what is 2 times 50? 100, right? Now does 100 exactly equal 100? Yes. so that comparison yields, True

Work through each problem, slowly and carefully and then only give the assignment, like so...

bool_two = True

#4

I just added == True, everything else was there in lesson.


#5

and that is where you made your mistake.


#6

Now it works, thank you.


#7

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