This action will force synchronization from Yonja/python100, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
#!/usr/bin/python# -*- coding: UTF-8 -*-"""题目:画图,学用rectangle画方形。程序分析:rectangle(int left, int top, int right, int bottom)参数说明:(left ,top )为矩形的左上坐标,(right,bottom)为矩形的右下坐标,两者可确定一个矩形的大小"""if __name__ == '__main__':from Tkinter import *root = Tk()root.title('Canvas')canvas = Canvas(root,width=400,height=400,bg='yellow')x0 = 263y0 = 263y1 = 275x1 = 275for i in range(10):canvas.create_rectangle(x0,y0,x1,y1)x0 -= 5y0 -= 5x1 += 5y1 += 5canvas.pack()root.mainloop()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。