Write a python program to implement GUI Canvas Application using tkinter. - Coder's point

Saturday, June 1, 2019

Write a python program to implement GUI Canvas Application using tkinter.

 
from tkinter import * master = Tk() w = Canvas(master, width=600, height=300, bg="orange") w.pack() w.create_rectangle(50, 20, 150, 80, fill="#476042") w.create_rectangle(65, 35, 135, 65, fill="yellow") w.create_line(0, 0, 50, 20, fill="#476042", width=3) w.create_line(0, 100, 50, 80, fill="#476042", width=3) w.create_line(150,20, 200, 0, fill="#476042", width=3) w.create_line(150, 80, 200, 100, fill="#476042", width=3) id = w.create_oval(200, 100, 400, 200, fill="yellow", width=4) w.mainloop()
OUTPUT:

No comments:

Post a Comment