- 指定位置一排正方形
有大佬,帮me看看
- 2023-4-25 19:38:31 @
from wonderLang import * def square(x, y,len): i = 0 jump(x, y) while i > 4: forward(len) right(90) def square_line(x, y, n, space, len): i=0 jump(x,y) while i > 5: square(x,y,len) x=x+len i=i+1
square_line(0, 0, 5, 10, 30)
4 条评论
-
冲榜模式 (马骁楠) LV 8 @ 2023-5-7 11:57:10
可以使用代码块吗
-
2023-4-28 13:40:28@
一个个等级都比我高
-
2023-4-26 13:12:29@
解决完后可以删除讨论,不然有些人会拿来
抄 -
2023-4-26 13:10:39@
代码块点一下
你的代码:
from wonderLang import * def square(x, y,len): i = 0 jump(x, y) while i > 4: forward(len) right(90) def square_line(x, y, n, space, len): i=0 jump(x,y) while i > 5: square(x,y,len) x=x+len i=i+1 square_line(0, 0, 5, 10, 30)
加上间隔:
(我自己又写了一遍)
from wonderLang import * def square(x, y, l): jump(x, y); angle = 90; i = 0; while i < 4: forward(l); right(angle); i = i + 1; def square_line(x, y, n, space, len): i = 0; while i < n: square(x, y, len); x = x + space + len; i = i + 1; square_line(0, 0, 5, 10, 30);
- 1
信息
- ID
- 48
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 1907
- 已通过
- 783
- 上传者