Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Please, before saying it has nothing to do with your issue, have you tried your code with a single digit number? I've added the if and your code worked.
Note that in your properly formatted code, you have
n_ st
and it should ben_st
instead.Your code is failing with single digit numbers. Why did you remove the if?
Mark your post as having spoiler content next time, please. And also, it's a problem with your code, so use Question instead of issue, see how many Python completions there already are:
When posting code, try using proper markdown too, because in Python indentation is important.
If what I think is right this is the output to the console with your code (I had to guess how the indentation was because it was lost):
And you can see when you use this:
The index (-3) is out of range.