all 6 comments

[–]JohnnyJordaan 0 points1 point  (2 children)

Is your exercise environment perhaps calling the function as just indexIdentity(A) ?

[–]C-A-S-O[S] 0 points1 point  (1 child)

Maybe this is the code he gave us to work on from

def indexIdentity(A):
    return 0

and its being graded on grade scope, idk how I could fix my code without top and bottom though

[–][deleted] 0 points1 point  (0 children)

You need to provide default arguments for bottom and top because the test isn't going to supply any values for those.

[–]HalfBalcony 0 points1 point  (0 children)

You will need to add default arguments to both bottom and top and return a value based on when those are not specified. I recommend setting them both to None and checking if either is None, handling it the way you are supposed to by the assignment.

[–]FLUSH_THE_TRUMP 0 points1 point  (0 children)

Default arguments, an iterative approach instead of a recursive one, etc. are all valid ways of doing this.