Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on 07/10/2014
- circulos que se mueven
- @author: A01221672
- '''
- from Tkinter import*
- x=1
- ancho=600
- alto=375
- ventana = Tk()
- lienzo =Canvas(ventana, width= ancho, height=alto)
- lienzo.pack()
- while True:
- if x < 40 :
- lienzo.delete('all') # borrar la pantalla . limpia
- lienzo.create_oval(x+100,200,x,100,fill= "#1e1e26", width=0, outline="#1e1e26") #circulo negro
- lienzo.after(100)
- lienzo.update()
- x = x + 5
- else:
- lienzo.delete('all') # borrar la pantalla . limpia
- lienzo.create_oval(x+100,200,x,100,fill= "#1e1e26", width=0, outline="#1e1e26") #circulo negro
- lienzo.after(100)
- lienzo.update()
- x = x - 5
- mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement