Topic And


#1



https://www.codecademy.com/en/courses/python-beginner-BxUFN/2/2?curriculum_id=4f89dab3d788890003000096


Do you do bidmass in computing or would you go in order?


I thought bool 4 was true and true but it was not would you not multiple the 10 by 2 first or in computer languages we do not consider this


bool_one = 2 > 2 and 1 > 4

bool_two = 2 < 1 and 1 > 8

bool_three = 21 >= 18 and 21 != 7 * 3

bool_four = 21 >= 7 * 3 and 19 < 21

bool_five = 5 > 1 and 2 <= 4


#2

It is true and true.

-(1**2) < 2**0 and 10 % 10 <= 20 - 10 * 2 ==
-1 < 1 and 0 <= 20 - 20                   ==
True and 0 <= 0                           ==
True and True                             ==
True

#3

I meant false sorry. Lets say you did it using bidmass you woud do 10*2 first then subtract


#4

And you will get True.

10 % 10 is equal 0.

20 - 10 * 2 = 20 - 20 = 0.

Is it true that 0 <= 0? Yes.


#5

No 10% of 10 is 1 or is it not asking for 10% of 10. I am confused haha


#6

No, it is asking for modulo, remainder of 10 / 10 division.

10 / 10 = 1, remainder 0

So 10 % 10 is equal to 0.


More about modulo with a great cookie image -> https://discuss.codecademy.com/t/modulo/53766/4?u=factoradic


#7

ah I forgot thank you good sir


#8

You're very welcome :slight_smile:


#9

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