Ad
  • Default User Avatar

    It must be really cringey, when you have coded this in a normal procedural way, and then you're like hey let's do it again this time with list comprehensions so i can look smart.

  • Default User Avatar

    Python:
    I passed all tests except one. It's the the third one from the fixed tests.

    • 'The fight was a draw.' should equal 'Missile Bob has won the fight.'

    Weird cause after each attack i check if somebody has won (and if somebody reached health==0, i print the other guy won). Please check the test case. Thanks :)

  • Default User Avatar

    we get it you know OOP :D

  • Default User Avatar

    Python test cases failed (all other passed):

    • '000010' should equal '00010'
    • '0010' should equal '010'
    • 'foobar001000' should equal 'foobar01000'

    So should we decrement the amount of zeros before the actual number by 1 if they are more than 2? I guess not, cause when i implement that, then i fail some test cases that state i should have the same amount of zeros before and after, previous to the actual incremented number. I think your test cases should be more consinstent.

    For example in this one, this clearly doesnt happen:

    • Test.assert_equals(increment_string("foobar001"), "foobar002") i passed that btw.
  • Default User Avatar

    Can you elaborate more on "print the input"?

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Nahhh. Been coding in many languages.

  • Default User Avatar

    For some reason i thought about the tree data structure, and brought to my mind that you have to take a certain path to reach a point in the row, knowing the first or last number. Crazy how overthinking can screw you up sometimes.