i'm working on a game and this error is showing that Turtle object has no attribute dx.
# main game loop
while True:
wn.update()
#move the ball
ball.setx(ball.xcor() +ball.dx)
ball.sety(ball.ycor() +ball.dy)
Exception has occurred: AttributeError 'Turtle' object has no attribute 'dx' File "C:\Users\Desktop\pong game\Pong.py", line 97, in ball.setx(ball.xcor() +ball.dx) AttributeError: 'Turtle' object has no attribute 'dx'