Why is this code not working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is this code not working?

If ball.ycor() > 390: ball.sety(390) ball.dy * = -1 Basically ball is a turtle and if the y coordinate of the ball is > 390 then the dy (d = direction) should change, but it is not.

29th Jun 2019, 3:15 PM
Shreyansh Banerjee
Shreyansh Banerjee - avatar
1 Answer
+ 4
Try deleting ball.sety(390)
29th Jun 2019, 3:42 PM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar