Python用tkinter画同心圆的小练习

Python里,使用tkinter“学用circle画圆形”的小练习代码:【开发环境:Win10,python3.7】
 
import tkinter
if __name__ == '__main__':
    t = tkinter.Tk()
    canvas = tkinter.Canvas(width=800, height=600, bg='yellow')  
    canvas.pack(expand=tkinter.YES, fill=tkinter.BOTH)                
    k = 1
    j = 1
    for i in range(0,26):
        canvas.create_oval(310 - k,250 - k,310 + k,250 + k, width=1)
        k += j
        j += 0.3

    t.mainloop()
 
 
Mark一个tkinter包的链接,好像讲的比较细致,留待后看。
https://www.cnblogs.com/shwee/p/9427975.html

猜你喜欢

转载自www.cnblogs.com/vaiky/p/11770704.html