#spinloop 2 2 balls in orbits python 11 import random import time import math from Tkinter import * frmMain = Tk() myCanvas = Canvas(width=400, height=400, background="orange") degrees = 270 degrees2 = 270 for i in range(200): xpt = 150 + int(100 * math.cos(degrees * math.pi/180)) ypt = 200 + int(100 * math.sin(degrees * math.pi/180)) xpt2 = 250 + int(100 * math.cos(degrees2 * math.pi/180)) ypt2 = 200 + int(100 * math.sin(degrees2 * math.pi/180)) myCanvas.create_oval(xpt,ypt,xpt+25,ypt+25,fill="white",outline="white") myCanvas.create_oval(xpt2,ypt2,xpt2+25,ypt2+25,fill="red",outline="red") myCanvas.pack() myCanvas.update() time.sleep(0.1) myCanvas.create_oval(xpt,ypt,xpt+25,ypt+25,fill="orange",outline="orange") myCanvas.create_oval(xpt2,ypt2,xpt2+25,ypt2+25,fill="orange",\ outline="orange") degrees = degrees + 10 degrees2 = degrees2 - 10 myCanvas.pack() frmMain.mainloop()