Ad
  • Custom User Avatar

    I have no idea why this is failing on random tests with Python.

    if boss is in the room, times their score by two. - I've tried limiting that to a max of 10, tried without the limit too.

    Add all of the scores up, divide by how many people there are. I've tried calculating with all people in the dict, I've tried removing zero rated people.

    I've tried multiple ways of calculating an average - Mean, Median, Mode, integeger division, float division... everything.

    What am I missing here? :-/

  • Custom User Avatar

    Who said anything about C++ ?

    I did it in Python which can be OO but also can be functional, dynamic, procedural etc. Nobody should learn C++ as their first language.
    The Kata isn't only available in C++ but in lots of other languages.

  • Custom User Avatar

    There is no way this is an 8kyu kata. I had to look up the formula for finding the distance between two points and if I hadn't been coding for a while, I would have had no idea how to handle classes. This needs the level upping. OOP is not something that people learn straight away when learning to code!!!

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Ahh I didn't realise we had to publish them. I thought they were automatically published once we completed them. I'm new here so just learning the ropes :)
    I used Python for this one.

  • Custom User Avatar

    I managed to do this but in the longest way possible. Does anyone have any good reference material to learn about how to handle states like this?

    I've ended up doing about 40 different if else statements to get every possibility as opposed to understanding how to handle each state with a few lines of code. Any help appreciated.