I don't understand the latest exercise in the first test,how to get right solution? | Sololearn: Learn to code for FREE!
0

I don't understand the latest exercise in the first test,how to get right solution?

8th Apr 2018, 11:24 AM
Евгений Рымаров
Евгений Рымаров - avatar
4 odpowiedzi
+ 4
You are available with some eXPerience. Therefore the best is to use hints or unlock the correct solution. Additionally, we couldn't help you like that, please provide a link to the module question or post the question itself! :)
8th Apr 2018, 11:48 AM
Dev
Dev - avatar
0
О каком тесте идет речь? >>> x = 3 >>> num = 17 >>> print(num % x) ?
9th Apr 2018, 5:46 AM
strawdog
strawdog - avatar
0
about this, thanks for your attention, Jevgeni.
9th Apr 2018, 10:46 AM
Евгений Рымаров
Евгений Рымаров - avatar
0
Евгений Рымаров % - выдает остаток от деления нацело. 17 % 3 = 2 Иначе можно записать так: 17 - (17//3)*3 = 2 то есть, 17 делится на 3 нацело 5 раз (// - оператор деления нацело). При этом после деления остается еще 2. эта двойка и есть ответ. В англоязычной литературе оператор называется modulo или modulus.
9th Apr 2018, 11:15 AM
strawdog
strawdog - avatar