I am trying to finish my program but it comes up with this error....The program asks you how many sides and the length of the sides then draws a shape....
Code:
import tkinter
import turtle
window = tkinter.Tk()
def callback():
pen1 = turtle.Pen()
for i in range(ent):
pen1.forward(ent1)
pen1.right(360/ent)
lbl = tkinter.Label(window, text="How Many Sides :")
lbl.pack()
ent = tkinter.Entry(window)
ent.pack()
lbl1 = tkinter.Label(window, text="Length Of Sides :")
lbl1.pack()
ent1 = tkinter.Entry(window)
ent1.pack()
btn = tkinter.Button(window, text="Draw", command = callback)
btn.pack()
window.title("Shape Creator")
window.geometry("300x300")
window.mainloop()
Comment