+ 1

Modulo iOS error

Just started but I believe the remainder in your following example is incorrect. >>> 20 // 6 3 >>> 1.25 % 0.5 0.25 The correct should be >>> 20 % 6 2

8th May 2019, 6:26 PM
Mark
3 Answers
+ 1
// = integer true. But the exercise was instructing the second step which is to get a remainder by using the modulo operator %. Doing so at the py command line returns the correct remainder answer 2. No?
8th May 2019, 6:41 PM
Mark