Search Here

Python program to draw Hexagon using inbuilt graphics functions

from tkinter import *

app=Tk()
app.title("Hexagon")

canvas=Canvas(app)
canvas.pack()
canvas.config(width=400,height=400)

points = [50, 100, 200, 10, 350, 100, 350, 250, 200, 340, 50, 250]
canvas.create_polygon(points, outline='black', fill='', width=5)

app.mainloop()

Hexagon using inbuilt graphics functions
Output

No comments:

Post a Comment