Ad
  • Custom User Avatar
  • Custom User Avatar

    I based my assumption in the expected results message ;)

  • Custom User Avatar

    Mutating the input means...

    ...or using pop, append, extend (the last two are not probable usages here, but...) on one of the lists (which should actually be tuples... EDIT: that's the perfect indication: if one single thing you do with the input couldn't be done with tuples, you're mutating the inputs)

  • Custom User Avatar

    If you mutate the input those cases change from those values to these (an additional of 150 points added to whoever catched the snitch):

    Testing for [50, 'yes'] and [300, 'no'] -> after the end of the game it's 350 vs 300 # Gryffindor wins
    Testing for [200, 'no'] and [50, 'yes'] -> here it's 200 vs 350 # Slytherin wins
    Testing for [300, 'no'] and [50, 'yes'] -> and here 300 vs 350 # Slytherin wins
    

    Mutating the input (in this case) means you're doing gryffindor[0] = ... and slytherin[0] = ... in your code (or +=).
    Because the control function uses the mutated values as input. I've solved it without mutating the input and the tests passed. Could you try doing that? Or just wait for the issue to be resolved.

  • Custom User Avatar

    2 posts below, someone reported an issue about input mutation in Python, are you doing that?