Commit 0052cc45 by BellCodeEditor

auto save

parent f5d93e38
Showing with 35 additions and 4 deletions
......@@ -4,6 +4,5 @@ print(students)
students.append("诺依")
print(students)
red=students[:3]
blue=students[3:]
print(red)
print(blue)
\ No newline at end of file
blue=students[3 :]
print(red)
\ No newline at end of file
import turtle
import random
pen=turtle.Pen()
def tree(n):
if n>=0:
if n <=12:
color_list =['snow','lightcoral']
color =random.choice(color_list)
pen.pensize(n/3)
else:
pen.color('sienna')
pen.pensize(n/10)
angle=random.random()
pen.forward(n)
pen.right(30*angle)
lenght=1.5*random.random()
tree(n-10*lenght)
pen.left(60*angle)
tree(n-10*lenght)
pen.right(30*angle)
pen.up()
pen.backward(n)
pen.down()
w=turtle.Screen()
w.bgcolor("wheat")
pen.left(90)
pen.up()
pen.backward(150)
pen.down()
tree(60)
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