0

Python3 - Adding Remainders - Why doesn't this code work?

Hello, I'm trying to complete one of the challenges on the python course (6.2) print((76 % 18) + (76 % 19)) in the code playground this comes back with an answer of 4 - I'm trying to understand why this is showing as incorrect This is my second day stuck on this question Any assistance will be greatly appreciated Thank you

12th Jan 2021, 6:48 AM
Mark Smith
2 Réponses
+ 1
Did you get the input?
12th Jan 2021, 7:51 AM
noteve
noteve - avatar
0
You wrote, you get 4 as output. What output do you expect? print("division:\n76 / 19 = ", 76 / 19, "\n76 / 18 = ", 76 / 18) print("modulus:\n76 % 19 = ", 76 % 19, "\n76 % 18 = ", 76 % 18) print("floor division:\n76 // 19 = ", 76 // 19, "\n76 // 18 = ", 76 // 18)
12th Jan 2021, 8:43 AM
Lisa
Lisa - avatar