- 边长 2 正 1000 边形(函数)
P0250,995
- 2023-1-7 20:02:50 @
def polygon(length, angle, sides):
i = 0
while i < 3:
forward(length)
right(angle)
i = i + 1
polygon(100, 90, 4)
4 条评论
-
和平精英 (廖子杨(25)) LV 5 @ 2023-2-1 20:15:27
i = 0没有缩进,导入wonderlang 参数也有问题
from wonderLang import * def polygon(length, angle, sides): i = 0 while i < sides: forward(length) right(angle) i = i + 1 polygon(2, 0.36, 1000)
-
2023-1-12 16:01:37@
i=0没有缩进 还有导入wonderlang 参数也有些问题
from wonderLang import * def polygon(length,angle,sides): i=0 while i < sides: forward(length) right(angle) i = i + 1 polygon(2,0.36 , 1000)
-
2023-1-8 9:12:24@
你还忘了导入wonderlang中的所有内容@罗梓嫣
-
2023-1-8 8:55:23@
from wonderLang import * def polygon(length,angle,sides): i=0 while i<sides: forward(length) right(angle) i=i+1 polygon(2,0.36,1000)
i=0没有缩进,,,,
- 1
信息
- ID
- 29
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 4
- 标签
- 递交数
- 1972
- 已通过
- 962
- 上传者