from tkinter import * #导入tkinter下所有包,用于GUI开发#窗口创建tk=Tk()cans=Canvas(tk,width=400,height=400)#定义窗口规格cans.pack()cans.create_line(0,0,600,600,fill='red') #画线cans.create_arc(10,10,200,100) #画弧def test(): print('GUI test')btn=Button(tk,text='click me',com…