Section 8. Not Statements


#1

Hi All,

I'm on section 8 of "Not Statements", see https://www.codecademy.com/courses/python-beginner-BxUFN/2/4?curriculum_id=4f89dab3d788890003000096.

I am confused on the following:

(1) Why is #3 NOT false? 10 modulo 3 is 3, 10 modulo 2 is 5. Which means 3 is in fact less than or equal to 5 and "not true" = False.
"Set bool_three equal to the result of not 10 % 3 <= 10 % 2"

Thanks,

Sam


#2

Not true. 10 divide by 3 is 3 with remainder, 1. The remainder is the modulo. 3 is the whole number in the quotient.

10 / 3  => 3 and 1/3

10 % 3  => 1

#3

Ah. Thanks for the clarification.

So 10 modulo 2 is 0. Which would mean the statement is NOT FALSE (TRUE)--- 1<=0.


#4

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