找回密码
 中文实名注册
查看: 107|回复: 1

倪仲帅

[复制链接]

5

主题

21

帖子

1043

积分

金牌会员

Rank: 6Rank: 6

积分
1043
发表于 2024-4-20 15:18:20 | 显示全部楼层 |阅读模式

def draw_tree(length):
    if length > 10:
        tutu.forward(length)
        tutu.right(20)
        draw_tree(length - 20)
        tutu.left(40)
        draw_tree(length - 20)
        tutu.right(20)
        tutu.backward(length)

tutu.penup()
tutu.left(90)
tutu.backward(200)
tutu.pendown()

draw_tree(100)

turtle.done()


回复

使用道具 举报

5

主题

43

帖子

730

积分

高级会员

Rank: 4

积分
730
发表于 6 天前 | 显示全部楼层
:@
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

小黑屋|东台市机器人学会 ( 苏ICP备2021035350号-1;苏ICP备2021035350号-2;苏ICP备2021035350号-3 )

GMT+8, 2024-5-3 20:58 , Processed in 0.043890 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表