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
2 Réponses
+ 1
Did you get the input?
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)