Recursion depth exceeded | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Recursion depth exceeded

I'm trying to learn turtle graphics in python and I decided to start with creating the game pong. I got the paddles to move inside the border of the game, I got some functions to make the ball move, BUT (I don't know why) when the ball moves for too long I get a Recursion Depht Exeded. Can someone explain???? I don't know what that is...

16th Nov 2019, 7:31 PM
Ricardo Quintela
Ricardo Quintela - avatar
1 Antwort
+ 5
Recursion is a function which calls itself. Like this: def move(amount): total += amount move(total) this function will run forever. When you call the move function, it will call itself, which will call itself. . . . Something in your program is acting like this. The only way we can help you though is if you share your program. Otherwise there's no way we could know what's going on
16th Nov 2019, 7:36 PM
Jax
Jax - avatar