Ad
  • Custom User Avatar

    btw, I get an index error when I attempt it

  • Custom User Avatar

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

  • Custom User Avatar

    I am having the same problem as jgarwin95. My code does what it says in the description. After defining a = [1, 2, 3, 4], calling a[0] returns 1 and calling it again returns 2 (since a[0] is deleted after the first calling). However, I get an error saying '1 should equal 2' for the first case, and '2 should equal 4' in the second case. Any ideas on why this might be the case? If you need to see my code, let me know and I can copy and paste it.

    And just to see what happens, I redefined my code so that when a[index] is called, it returns (and pops) a[index+1], i.e the output would be 2 in the first case. However, now the test case gave an error saying '2 should equal 1' !!!!

  • Custom User Avatar

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

  • Custom User Avatar

    oh yeah, lol thanks

  • Custom User Avatar

    How can I see the input parameters of Test 0? That's the only test my code doesn't work for. The 'Sample tests' box in the bottom right only show the parameters for Test 1 & 2.

  • Custom User Avatar

    ah okay thanks, will do

  • Custom User Avatar

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

  • Custom User Avatar

    I am a rank 5 now and I mostly trained in python. I recently picked up c# and started training in it. I just got a notification saying I reached rank 7kyu in c#. Is there a way for me to see what rank I am, in all the different lanugaes that I have trained in?

  • Custom User Avatar

    okay I will keep it in mind for next time thanks. For now, I managed to fix it by changing the version I was using from 3.4.3 to 3.6.

  • Custom User Avatar

    my code works fine when i run it in pycharm but here it gives me syntax error