Commit f2b98f66 by BellCodeEditor

save project

parent a8207343
Showing with 9 additions and 7 deletions
import turtle
i
import random
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
def a(n):
if n>=30:
if n>=0:
b=random.random()
c=1.5*b
turtle.forward(n)
turtle.right(30)
a(n-10)
turtle.left(60)
a(n-10)
turtle.right(30)
turtle.right(30*b)
a(n-10*c)
turtle.left(30*2*b)
a(n-10*c)
turtle.right(30*b)
turtle.up()
turtle.backward(n)
turtle.down()
......
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