7 kyu

Triple Crown

294 of 331keczanilles
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • Quark Fox Avatar

    Tricky Kata! not as easy as it seems! Every newcomer like me should practice! Thaks keczanilles

  • dienesviktor Avatar

    C# translation - please check and approve! By the way, nice Kata. :)

  • sid114 Avatar

    approved

  • sid114 Avatar

    won't it make more sense to randomize the players' names or at the very least the order of the players?

    stupid solutions like mine (in my opinion) shouldn't be able to pass the tests

    • keczanilles Avatar

      Thank you for the feedback and the suggestion! It was meant to be around 7 kyu so I thought it is difficult enough but maybe I will try to work on randomising the names!:)

    • sid114 Avatar

      good point, but i dont think randomising the order of the names (or the names itself) is makes the kata harder

      my thought process was to limit the amount of hard coding needed to solve this

      but then again i don't know NFL so this could be my ignorance on autopilot

  • FArekkusu Avatar

    Now you will receive a dictionary with the following keys: Cooper Kupp, Justin Jefferson, Davante Adams

    It's not clear whether the dictionary is guaranteed to contain all 3 keys. This is true for random tests, but not for sample or fixed tests.

    • keczanilles Avatar

      Thank you, I have modified it: Now you will receive a dictionary with the following keys (will always contain each) and added a note at the end which declares that in examples and fixed tests there are 2 keys but you will receive 3.

    • FArekkusu Avatar

      Change the sample and fixed tests to follow the specifications. "There's a note in the description" is not an excuse for laziness.

    • keczanilles Avatar

      I have changed the fixed tests with 3 keys and deleted the note.

    • FArekkusu Avatar
      Issue marked resolved by FArekkusu 3 years ago
  • FArekkusu Avatar

    If there is no receiver with the most values in all categories you should return 'None of them'

    The expected result for such cases is indistinguishable from normal function output.

  • FArekkusu Avatar

    There should be a fixed test where one of the competitors shares 1 or 2 values with the competitor whose stats are the highest.

    • keczanilles Avatar

      I added it to the description as well and now I have a fixed test where it demonstrates that it should be 'None of them' since they are sharing the most in 1 or 2 category.

    • FArekkusu Avatar

      There're still no fixed tests for such cases.

    • keczanilles Avatar

      Maybe I'm wrong but I thought this is a fixed test as you suggested:

      test.assert_equals(triple_crown({'Cooper Kupp': {'Receiving yards': 1800, 'Receiving touchdowns': 16, 'Receptions': 110},
                                              'Davante Adams':{'Receiving yards': 1800, 'Receiving touchdowns': 16, 'Receptions': 113}}), 'None of them')
      

      Since they share the receiving yards and the receiving touchdowns being each 1800 and 16 respectively.

    • Blind4Basics Avatar

      This part of the spcification should also be clearly stated in the description, not just shown in an example.

      Cheers

    • keczanilles Avatar

      "Example with two receivers sharing values in at least one category:" I have this part in the description with a code and a comment which specifies the situation. But if it is not clear enough let me know.

    • FArekkusu Avatar

      "Sample tests" and "fixed tests" are 2 different things. You've updated the former, but not the latter.

    • keczanilles Avatar

      I think I have updated it everywhere now with 3 keys as well.

    • FArekkusu Avatar
      Issue marked resolved by FArekkusu 3 years ago
  • FArekkusu Avatar

    All it headers have the same message: "None of them should equal None of them".

    • keczanilles Avatar

      Thank you for your comment! the message is f'{solution} should equal {solution} so if you have it incorrectly it will say 'Wrong answer' should eqaul 'None of them'. It is because other cases than None of them are quite rare so most of the answers is 'None of them'

    • keczanilles Avatar

      Hello, if it is solved can you please mark it as resolved? Thank you very much!:)

    • FArekkusu Avatar

      You haven't fixed anything, what are you talking about?

    • keczanilles Avatar

      But not all headers have the same message, it depends on your solution it will say 'Your answer' should equal 'Right answer'

    • keczanilles Avatar

      I have changed it so it will show what the dictionary are and what should it equal to. Is it better?

    • FArekkusu Avatar

      it depends on your solution it will say 'Your answer' should equal 'Right answer'

      It never worked that way.

      have changed it so it will show what the dictionary are and what should it equal to

      You're only making it more misleading. it headers should not be used for displaying expected value at all.

    • keczanilles Avatar

      So what should I write there then because I dont know really. I saw a lot katas with my first idea for it and a lot of katas with my second idea. If you can tell me what would be good it would be much appreciated thanks.

    • keczanilles Avatar

      I have updated it again, is it better?

    • FArekkusu Avatar
      Issue marked resolved by FArekkusu 3 years ago
  • FArekkusu Avatar

    There're way too many tests.

    • keczanilles Avatar

      Thank you for your comment! I thought it is necessary because there is quite a low chance to have the most in every category so I thought in 1003 test there will be at least one other than 'None of them' so you cannot solve the kata with just return 'None of them'

    • FArekkusu Avatar

      Then maybe you should increase the probability of award-winning players coming up? Currently 97-98% of the tests expect "None of them" which is way too low.

    • keczanilles Avatar

      Okay, for sure I will work on this! Thank you! I will let you know when it is ready.

    • keczanilles Avatar

      So i updated it, there are only 3 receivers left and only 100 random tests. The probability is around 10% for getting a name which I think is okay for the story of the kata since getting a triple crown is quite rare.

    • FArekkusu Avatar

      The probability is around 10%

      5-15% is fairly low. There should be 200 or maybe 300 tests.

      which I think is okay for the story of the kata since getting a triple crown is quite rare

      The kata backstory has nothing to do with the quality of the input generator. Especially, when it is possible to generate inputs with a guaranteed winner easily.

    • keczanilles Avatar

      I modified it to 250 random tests if its okay.

    • FArekkusu Avatar
      Issue marked resolved by FArekkusu 3 years ago