此帖子分 8 块:

点击以展开
  1. 函数
  2. turtle画图(普通)尚未更新
  3. turtle画图(染色)尚未更新
  4. turtle画图(进阶)尚未更新
  5. 列表 尚未更新
  6. turtle画国旗 尚未更新
  7. 循环 尚未更新
  8. 有需要的同学可以在评论区写

warning: 你没必要去抄代码


使用def 名称(函数):去写函数

在这里我使用了自己函数库里的函数做实验

1.万能图形右画法(难度:3.4):
def turtle_draw_right(bianshu, bianchang, dushu):
    i = 0
    while i < bianshu:
        turtle.forward(bianchang)
        turtle.right(dushu)
        i = i + 1
2.万能图形左画法(难度:2.0):
def turtle_draw_left(bianshu,bianchang,dushu):
    i = 0
    while i < bianshu:
        turtle.forward(bianchang)
        turtle.left(dushu)

        i = i + 1

本期帖到期结束,我们下期再见😄

2 条评论

  • 1