Ad
  • Custom User Avatar

    Yup:

    • Fixed the values in the description supplying output with rounding to first decimal place instead. The tests accept both rounded and unrounded inputs.
    • Decided to leave only one hardcoded sample test for 100 with the rest being randomly generated via a for loop. There're 10 of these now.
    • Dropped the reference to 0 value.
  • Custom User Avatar

    Okay, I think I finally managed to wrap my head around this, random test cases and all. Please have a look if I missed/misunderstood anything. Again, thanks for helping out.

  • Custom User Avatar

    Well, I just pasted it in and it seems to be working. I'll try to figure out random test cases in a day or two. Thanks for your feedback and input!

  • Custom User Avatar

    I'm a little shaky on testing and it seems that implementing Test.assertApproxEquals will require overhauling the tests altogether because of the comparison I use. I'll try to figure it out, but, if you feel up to it, contributions are more than welcome ;-)

    I'll change the output for 0 (done). Thanks.

  • Custom User Avatar

    Yeah, I didn't check around for similar kata, just wanted to try and publish my own. Because reasons. Guess I'll un-publish it in a few days.

  • Custom User Avatar

    Sorry about that. All fixed now. Thanks for pointing this out.