Commit ca1ac4ee by BellCodeEditor

auto save

parent f40d9112
import turtle
t.penup()
t.goto(-200,0)
text ="你好,我的名字是小小"
......
......@@ -2,11 +2,14 @@ import turtle
import random
t = turtle.Turtle()
t.penup()
t.goto(-200,0)
text="你好,我的名字叫小贝"
for i in text:
font_size = random.randint(10,30)
text_color = (random.random(),random.random(),random.random())
t.color(text_color )
t.pendown()
t.write(i,font=("Arial",font_size,"normal"))
jump_distance=random.randint(20,50)
......
import turtle
import random
turtle.bgcolor("red")
def draw_blade(length):
turtle.begin_fill()
for _ in range(3):
turtle.forward(length)
turtle.left(120)
turtle.end_fill()
num_blades=5
a=120
turtle.pensize(20)
turtle.color("yellow")
turtle.setheading(270)
turtle.forward(300)
turtle.backward(300)
turtle.pensize(3)
for _ in range(num_blades):
color = (random.random(),random.random(),random.random())
turtle.color(color)
draw_blade(a)
turtle.left(360/num_blades)
turtle.hideturtle()
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