1from tkinter import *
2root = Tk()
3myCanvas = Canvas(root)
4myCanvas.pack()
5
6def create_circle(x, y, r, canvasName): #center coordinates, radius
7 x0 = x - r
8 y0 = y - r
9 x1 = x + r
10 y1 = y + r
11 return canvasName.create_oval(x0, y0, x1, y1)
12
13create_circle(100, 100, 20, myCanvas)
14create_circle(50, 25, 10, myCanvas)
15root.mainloop()