help with %! PY :( | Sololearn: Learn to code for FREE!

0

help with %! PY :(

i know it’s a dumb question but when you’re solving a problem, in what context you realize you need to use modulus operator? i’m having troubles with it and it’s driving me CRAZY. (sorry if i wrote something wrong but english it’s not my native language)

5/1/2021 9:11:16 PM

Mash Rykova

4 Answers

New Answer

+1

Hi! The operator of the remainder of the number % (for example: 17 % 3 = 2) 1. Take the nearest number when divided by 3 would be zero. That's apparently 15 2. Subtract 15 from 17 and the result is your answer. ...If you find it difficult to explain yourself in English - ask in Russian, some users use translators and will be able to answer you in Russian, but the percentage of answers will be less

+1

Hi! You will need the modulo operator, for example when you want to find out if a number is a odd or even number, when a number is a divisor to another number, or if a year is a leap year, or not.

0

Для большего понимания этого оператора вот 3 задачи из курса по питону, где он используется/может использоваться: Остаток от деления Учебники для учеников Выражение elif V Учитывая четность Fizz Buzz на степике есть хороший курс по питону, где этому оператору тоже уделяется внимание и есть задачи для практики