✅ 操作成功!

Python编程之画圆

发布时间:2023-06-15 作者:admin 来源:文学

Python编程之画圆

Python编程之画圆

问题描述:画图,学会使用circle画圆形。  

源代码:

#!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': from Tkinter import * canvas = Canvas(width=800, height=600, bg='yellow') canvas.pack(expand=YES, fill=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 mainloop()

输出结果如下:

👁️ 阅读量:0