Answer:
PYTHON CODE FOR 27:
from tkinter import *
import math
root=Tk()
canvas=Canvas(root,width=400,height=400)
canvas.pack()
points=[]
x=200
y=200
r=100
for i in range(0,8):
points.append(x+r*math.cos(2*math.pi*i/8))
points.append(y+r*math.sin(2*math.pi*i/8))
octagon=canvas.create_polygon(points,fill='red')
stop=canvas.create_text(200,200,fill="white",font="Times 40
bold",text="STOP")
root.mainloop()
output:
in python (27) TKinter : Draw a Stop Sign on a canvas. The Stop Sign is a regular octagon coloured red with a white STOP written in its center (28) TKinter : Write a GUI compound interest caleulat...