CSCI 150 - Foundations of Computer Science
Spring 2013
Programming Exercises: Chapter 9, part 3
Here is one of our examples from class:
from tkinter import *
class Ex2(Frame):
def __init__(self, master):
super().__init__(master)
self.canvas = Canvas(self, height=200, width=200)
self.canvas.grid(row=0, column=0)
self.circle = self.canvas.create_oval(0, 0, 20, 20)
self.move()
def move(self):
self.canvas.move(self.circle, 1, 1)
self.after(100, self.move)
def runEx2():
root = Tk()
ex = Ex2(root)
ex.pack()
root.mainloop()
Modify this program so that:
Here is an image showing the application with several circles added: