Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tkinter_create_circle_func.py
- from Tkinter import *
- canvas_width = 180
- canvas_height =120
- master = Tk()
- w = Canvas(master,
- width=canvas_width,
- height=canvas_height)
- w.pack()
- def circle(x,y, r):
- id = w.create_oval(x-r,y-r,x+r,y+r)
- return id
- circle(canvas_width/2,canvas_height/2,30)
- circle(canvas_width/2,canvas_height/2,50)
- mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement