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.
I'm a beginner and trying to learn multiple solutions to different problems.
When I run this code with a negative number, it doesn't return 0 so there must be something about it I don't understand.
Can someone explain how this meets the requirements of the prompt if it doesn't return 0 for a negative number? Or is there something about this code that doesn't work when I run it in an environment like OneCompiler?