第五十六题

题目

用tkinter画图,学用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(400 - k,300 - k,400 + k,300 + k, width=1)
        k += j
        j += 0.3
 
    mainloop()
posted @ 2019-10-10 19:47  Franzqing  阅读(87)  评论(0编辑  收藏  举报