Write a python program that recreates the following picture

Write a python program that recreates the following picture using Python’s graphics package. Use a size of 600 by 600 pixels for the window. Although there are different ways to handle this, you’ll need to include four lines and one circle. The image is a square with a circle in the center and lines connecting the circle from all angles and the center. u can use library

Solution

from Tkinter import *

master = Tk()

w = Canvas(master, width=600, height=600)
w.pack()

w.create_line(0, 0, 200, 100)
w.create_line(0, 100, 200, 0, fill=\"red\", dash=(4, 4))
w.create_rectangle(50, 25, 150, 75, fill=\"yellow\")
w.create_oval(65,25,130,75)

master.mainloop()

Write a python program that recreates the following picture using Python’s graphics package. Use a size of 600 by 600 pixels for the window. Although there are

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site