import time
from tkinter import*
animation=Tk()
Canvas=Canvas(animation,width=800,height=800) # it is the windows size you can change itCanvas.pack()
Canvas.create_arc(10,10,100,100,fill='black')
for x in range(0,140): # don't forget to put ' : ' in the end of the forr loop Canvas.move(1,5,0)
animation.update()
time.sleep(0.05) # it is the time taken to move per placefor x in range(0, 140):
Canvas.move(1, -5, 0)
animation.update()
time.sleep(0.05)
for x in range(0,140):
Canvas.move(1,5,0)
animation.update()
time.sleep(0.05)
for x in range(0,140):
Canvas.move(1,-5,0)
animation.update()
time.sleep(0.05)
Comments
Post a Comment