+ 2

Why is it showing this?

The code is showing unlimited erorrs!!! But why? https://code.sololearn.com/cW4l3jwJIQRG/?ref=app

14th Sep 2019, 3:54 AM
Ishmam
Ishmam - avatar
3 odpowiedzi
+ 3
you created a recursion, that means the function counter() calls itself. But the number of recursive steps s limited. As Nandini mentioned you must create a condition that terminates the infinite running of the code. Like : if num == 500: return
14th Sep 2019, 7:06 AM
Lothar
Lothar - avatar
+ 1
It is running infinite times U need to write stop condition
14th Sep 2019, 3:58 AM
Nandini
0
But somehow I printed Infinite errors!!!
14th Sep 2019, 4:00 AM
Ishmam
Ishmam - avatar