#solar system for explanation--see python 11 import random import time import math from Tkinter import * frmMain = Tk() myCanvas = Canvas(width=400, height=400, background="dark blue") edegrees = 270 vdegrees = 270 mdegrees = 270 myCanvas.create_oval(180,180,220,220,fill="orange") #the sun--this doesn't move for i in range(200): ex = 200 + int(150 * math.cos(edegrees * math.pi/180)) ey = 200 + int(150 * math.sin(edegrees * math.pi/180)) vx = 200 + int(100 * math.cos(vdegrees * math.pi/180)) vy = 200 + int(100 * math.sin(vdegrees * math.pi/180)) mx = 200 + int(75 * math.cos(mdegrees * math.pi/180)) my = 200 + int(75 * math.sin(mdegrees * math.pi/180)) myCanvas.create_oval(ex,ey,ex+10,ey+10,fill="green",outline="green") myCanvas.create_oval(vx,vy,vx+7,vy+7,fill="yellow",outline="yellow") myCanvas.create_oval(mx,my,mx+4,my+4,fill="red",outline="red") myCanvas.pack() myCanvas.update() time.sleep(0.1) myCanvas.create_oval(ex,ey,ex+10,ey+10,fill="dark blue",\ outline="dark blue") myCanvas.create_oval(vx,vy,vx+7,vy+7,fill="dark blue",\ outline="dark blue") myCanvas.create_oval(mx,my,mx+4,my+4,fill="dark blue",\ outline="dark blue") mdegrees = mdegrees + 10 vdegrees = vdegrees + 5 edegrees = edegrees + 2 myCanvas.pack() frmMain.mainloop()