Ad
  • Custom User Avatar

    Hi @MichosDV - it seems that you have passed the kata, so just adding this comment so that other users don't think there is anything weird/problems with the kata.

    FYI, your problem is/was probably due to the behaviour of //, for example:

    correct = 1 # let's say this is the correct answer
    your_sol = 1.372 # let's say this was your answer
    
    rounded_with_6 = (your_sol * 6 ) // 6
    rounded_with_591227 = (your_sol * 591227 ) // 591227
    
    print(rounded_with_6) # = 1.0, now matches the correct answer
    print(rounded_with_591227) # = 1.0, now also matches the correct answer
    

    you can see above that multiplying by 6 then // 6 just has the effect of rounding your answer; the specific value of 6 is irrelevant - you could just as well use 591227 as I did above.

    The "exact solution" - being made up of a sum of integers - shouldn't need to be rounded though at any point, so I'm not sure where your tiny mistake crept in.