Nice one! But you forgot an edge case. I can still call it with a negative value and get a recursion error.
# RecursionError: maximum recursion depth exceeded in comparison
I think you should add another if else branch for when the value is less or equal than zero.
Given some context, which is ninjas talking, I doubt that they can talk negativly or that not talking at all is considered as talking
However, without those information, I fully agree ! 😄
I was reading the old ninja scroll all wrong... Thanks sensei 😁
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.