This is the general framework for the bouncing ball idea (modeled after the DVD logo bouncing in a room and everyone waiting for it to hit the edge).

def main():

canvas = Canvas(CANVAS_WIDTH, CANVAS_HEIGHT, ‘DVD’)

dvd = canvas.create_oval(. . .)

change_x = 1 # start with these initial velocities

change_y = 1

while True:

canvas.move(dvd, change_x, change_y)

if # we hit the top or bottom:

change_y = -change_y

elif # we hit the left or right:

change_x = -change_x

canvas.update()

time.sleep(DELAY)