New course! Every coder should learn Generative AI!
Try a free lesson0
how can i def a func.that gives factorial
2 Answers
+ 3
For that you need a while loop.
+ 2
You need to use a loop, but not necessarily a while loop. A for loop with range() is also suitable.