Ad
  • Custom User Avatar
    Random tests
    Testing for 'baal World What if Think squad what'
    Traceback:
       in 
       in 
    TypeError: gym_slang() takes exactly 1 argument (2 given)
    

    As shown, when testing with random inputs, a second argument is being passed, and the default function declaration of

    def gym_slang(phrase):
    

    fails.

    I captured the second argument and printed it, I got the following result:

    Random tests
    Testing for 'What world babylon Hello Combination I am world do not instagram world probably fake Fake Hello World gym babel'
    ()
    ([['i am', "i'm"], ['instagram', 'insta'], ['do not', "don't"], ['going to', 'gonna'], ['combination', 'combo']],)
    Test Passed
    Testing for 'Lorem Ipsum world baal Baal my crush Think Going to Crush wait Going to'
    ()
    ([['i am', "i'm"], ['instagram', 'insta'], ['do not', "don't"], ['going to', 'gonna'], ['combination', 'combo']],)
    Test Passed
    Testing for 'Do not was combination squad Lorem hello Probably If instagram Do not Do not Squad Hello wait hello Hello Probably Gym'
    ()
    ([['i am', "i'm"], ['instagram', 'insta'], ['do not', "don't"], ['going to', 'gonna'], ['combination', 'combo']],)
    Test Passed
    

    Hope this helps!

  • Custom User Avatar

    Some of the test cases pass an unexpected second argument to the function. The second arguments are not used, and it's easy enough to grab them with *args and then ignore them, but it shouldn't be passed in the first place.

  • Custom User Avatar

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

  • Custom User Avatar

    All you really need to do is setup

    class Node (object):
      pass