C1 W3 UNQ_3: assertion error

Hello @J_Jeslin! Welcome!

Code debugging can be challenging but it’s also part of any one’s programming life, and I think the key is to establish a way for ourselves to debug codes!

I suggest you to modify your function by adding printing lines to print the content of each variable used, and then run your modified function with some simple inputs. Please check out this post for a detailed example on how to do this. These steps help you verify the program is progressing up to your expectation.

Good luck @J_Jeslin!