1 Star 0 Fork 0

dingnate/python-example

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
58.py 442 Bytes
Copy Edit Raw Blame History
dingnate authored 2023-01-11 08:18 +08:00 . 修改目录名称
# coding=UTF-8
# 题目:画图,学用rectangle画方形。
if __name__ == '__main__':
from Tkinter import *
root = Tk()
root.title('Canvas')
canvas = Canvas( width=400, height=400, bg='yellow')
x0 = 263
y0 = 263
y1 = 275
x1 = 275
for i in range(19):
canvas.create_rectangle(x0, y0, x1, y1)
x0 -= 5
y0 -= 5
x1 += 5
y1 += 5
canvas.pack()
root.mainloop()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/dingnate/python-example.git
git@gitee.com:dingnate/python-example.git
dingnate
python-example
python-example
master

Search