Ad
  • Default User Avatar

    Test Failed
    5 is a perfect power
    Expected: not null
    But was: null
    error in c# unit test

  • Custom User Avatar

    Not an issue. Your solution is wrong, and that's causing the error.

  • Custom User Avatar

    Thanks but I feel like you are missing an important piece of info: my code passed all tests and the error is coming from my code but it's internal. I know this because my code doesnt have the shown elif statement (elif r[0]**r[1] != l:)

  • Custom User Avatar

    Your code is returning something wrong, it wasn't either None or a two element list.

  • Custom User Avatar

    I am getting the following IndexError. Maybe, inserting a Try/Except block in the "attempt" code may fix it.

    Time: 968ms Passed: 32 Failed: 0 Exit Code: 1
    Test Results:
    perfect powers
    should work for some examples (3 of 3 Assertions)
    should work for the first perfect powers (29 of 29 Assertions)
    STDERR
    Traceback (most recent call last):
    File "main.py", line 26, in
    elif r[0]**r[1] != l:
    IndexError: list index out of range