Commit 9d9755fb by BellCodeEditor

auto save

parent 576b5884
Showing with 43 additions and 0 deletions
import turtle
import time
import random
import pygame
time1=time.time()
pen = turtle.Turtle()
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
l=['snow','lightcoral']
pen.speed(10000000000)
a=l
def aaa(n):
if n >=0:
if n<=15:
pen.pensize(n)
pen.pencolor(random.choice(a))
else:
pen.pensize(n/10)
pen.color('sienna')
l=random.randint(5,15)
g=random.randint(15,20)
pen.forward(n)
pen.right(g)
aaa(n-l)
pen.left(g*2)
aaa(n-l)
pen.right(g)
pen.up()
pen.backward(n)
pen.down()
# 移动到起点
pen.left(90)
pen.up()
pen.backward(450) # 后退
pen.down()
aaa(80)
time2=time.time()
print(time2-time1)
turtle.done()
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