Ad
  • Default User Avatar

    Did this in python

    Great simple challenge for people new to coding although the instruction could have been a little more clear on how to handle rounding. I discovered that I could simply cast my result to an integer at the end and get a correct answer (i.e. if my final number is 150.9, casting to an int would result in 150 which would be accepted) although the given instruction was simply to "round" to an integer, which in a mathematics sense typically implies that .5 and less (inclusive) rounds down where greater than 0.5 rounds up. I would recommend specifying to round down as it could give those who are new to coding a chance to learn that it is usual for numbers to be rounded down when they are cast to an int.

    Overall this was a good kata. I did this kata in my own IDE in order to practice VIM and this was a good exercise for it.