1 Star 0 Fork 2

Asheng/python100

forked from Yonja/python100 
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
python64.py 536 Bytes
Copy Edit Raw Blame History
zhangweizhi authored 2016-06-04 15:16 +08:00 . the 100 theme
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
题目:利用ellipse 和 rectangle 画图。。 
"""
if __name__ == '__main__':
from Tkinter import *
canvas = Canvas(width=400,height=600,bg='white')
left = 20
right = 50
top = 50
num = 15
for i in range(num):
canvas.create_oval(250 - right,250 - left,250 + right,250 + left)
canvas.create_oval(250 - 20,250 - top,250 + 20,250 + top)
canvas.create_rectangle(20 - 2 * i,20 - 2 * i,10 * (i + 2),10 * (i + 2))
right += 5
left += 5
top += 5
canvas.pack()
mainloop()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Asheng008/python100.git
git@gitee.com:Asheng008/python100.git
Asheng008
python100
python100
master

Search