Ad
  • Default User Avatar

    Thank you for you comments. I have already fixed what you pointed out.

  • Default User Avatar

    you are right, i forgot to include it but it has nothing to do with my issue.

  • Default User Avatar

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

  • Default User Avatar

    Thank you for advices, I am new on this platform. You didnot get it right, i updates only in else, so it is

    ('n is', 12)
    ('Length of n is:', 2)
    ('We are in if', 'i is', 1, 'equal is ', 0, 'remainings are:', '1', '2')
    ('Out of while, i is', 1)
    ('sorted last digits are:', '21', '1', 'index is', 1, 'need to find ', '1')
    

    it is not resolved. It passes all the test everytime. there is 0 failed. But Exit Code: 1 is still there

    Traceback (most recent call last):
    File "main.py", line 41, in <module>
    Test.assert_equals(next_bigger(n),next_sol(n),"It should work for random inputs too")
    File "/home/codewarrior/solution.py", line 25, in next_bigger
    idx = inv.index(n_st[-(i+1)]) 
    IndexError: string index out of range
    
  • Default User Avatar

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