Help with math problems on "And"


On boolean 4 I don’t quite understand why it is true.
It states

  • 10 % 10 <= 20 - 10 * 2
    10/10 is 1. 20 - 10 * 2 is 0.
    This is false which would make the whole boolean false I believe. Yet, when I ran the script it told me it was true. Any help would be appreciated.


10 % 10 is not the same as 10 / 10

the modulo operator (%) works different from the division operator (/)


To piggyback on stetim94s answer:

I’m new to this, too. But the 10 % 10 basically looks how often you can fit ten into ten and then returns THE REST that wasn’t covered by this process.

Since 10 “fits” into 10 one time and leaves no rest, the return is 0, which is the same as 20-10*2, so it is not < as, but =. And since the operator looks for smaller OR equal (the latter being true), the statement is true.

I hope this makes sense, I also don’t understand everything yet and to makethings worse, I’m not a native speaker, so excuse me, if the description is a bit… clunky. :wink:


Ok that’s where I was off. Thanks!


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