- Python
函数专项训练(终阶4)要怎写?
- 2022-11-2 18:06:27 @
画一个中心矩形,中心点为(0, 0),宽为300,高为200 、 def center_rect(x, y, w, h): jump(x, y) x1 = x - w / 2 y1 = y + h / 2 rect(w, h) center_rect(0, 0, 300, 200) 要求:复制小明同学代码,看它是否可以正常运行,会有什么报错,如何修改正确 如何修改?求解
3 条评论
-
冲榜模式 (马骁楠) LV 7 @ 2022-11-28 21:41:47已修改
from wonderLang import * def rect(x,y,width,height): jump(x,y) forward(width) right(90) forward(height) right(90) forward(width) right(90) forward(height) right(90) def center_rect(x, y, w, h): jump(x, y) x1 = x - w / 2 y1 = y + h / 2 rect(x1,y1,w, h) center_rect(0, 0, 300, 200)
可以这样写@陈嘉翔
-
2022-11-28 21:38:57@
-
2022-11-3 9:24:49@
你发代码
- 1