Commit 07261421 by BellCodeEditor

auto save

parent b250abfe
Showing with 25 additions and 3 deletions
# 使用二分查找法,找出9和20在列表里面的索引 import turtle
num_list = [1, 3, 5, 8, 11, 15, 17, 18, 20, 21] a=turtle.Pen()
\ No newline at end of file
a.left(90)
a.penup()
a.fd(-200)
a.pendown()
a.speed(0)
def rtree(n):
if n>=30:
a.fd(n)
a.right(30)
tree(n-15)
a.left(60)
tree(n-15)
a.right(30)
a.penup()
a.fd(-n)
a.pendown()
a.right(20)
rtree(100)
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment