Ad
  • Custom User Avatar

    The return value is correct, as you need to not only make it up to the ghost, but you need to pass the ghost.

    But indeed, the random tests should have a special test suite to prevent this, otherwise it's easy to hardcode.

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

    I did make a few minor changes to the add_a_randomly and then increased the size of the pile in make_deck => (12,24)

  • Custom User Avatar

    Thanks, don't know how I missed that, it is fixed now.

  • Custom User Avatar

    Typo in description - ""GB" -> 'GB'

  • Default User Avatar

    Haskell translation, same as python. If something changes about the python one, lmk so I can update. I did crank up test count to 200. Don't tell anyone. Shh.

  • Custom User Avatar

    I think since you mention only "GB" is garbage, this solution should pass after all.

  • Default User Avatar

    Couldn't this be done with ints instead? Count milliseconds or microseconds or something if you don't like a large unit like seconds.

    In practice, choosing random floats isn't likely to pick ambiguous cases. But that's not necessarily a good thing, as those should be handled correctly. As @rdtheriault points out, those only get tested once in fixed tests.

    Random tests could also be written such that they intentionally check before/at/after edge cases.

  • Custom User Avatar

    I see what you mean. Given the rules of garbage only being GB, Na, and then fake cards with an "a" added at the end, it is going look for cards that can't exist. Is there something you want me to change? It does follow the rules abliet with looking for cards that don't exist. Thank you for the input.

  • Default User Avatar

    It has some invalid suits E R T and ranks A B C, I don't see how you could test that in a meaningful way though. Sure, could include garbage with those possible values, but, you can always pick some other invalid ranks/suits

  • Custom User Avatar

    I'm not sure if this is a testing issue (I'll explain in a bit) or an issue but I passed all the random test but one of the example tests failed and I used.

    if my_speed == 14 and ghost_speed == 6 and time == 2.5:
            return 1
    

    Was that test an edge case, if so, their needs to be more in the random test (testing issue).
    Doesn't seem like it should be an issue with the system if others did not have the same issue, but might be something to look into.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    Ok, I added "from solution import pick_em_up". I did not realize that is how it worked. Yes, I didn't like the nested if either. I did know the percents were not perfect and thought about doing the math for it but as you said, they are rather arbitrary and I needed some random statements that worked.

    Thanks again for all your help.

  • Loading more items...