Modulo #python

How to do?

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

after
order_263_r = 263 % 11
do
print(order_263_r)

if 263 is divisible by 11, then the remainder of dividing 263 by 11 would be 0 (and if 263 is not divisible by 11 then the remainder is not 0).
So you’re checking whether 263 % 11 is 0 or not
to determine whether the order gets a coupon.

depending on whether you get 0 or not,
the next line of could would be
order_263_coupon = "yes"
or
order_263_coupon = "no"
to say whether the order gets a coupon.

1 Like

Thanks!! I did it. :smile: