Commit 226904b7 by BellCodeEditor

save project

parent d544ff74
Showing with 4 additions and 23 deletions
import turtle
import random
# 随机螺旋线
t = turtle.Pen()
turtle.bgcolor('black')
colors = ['red', 'yellow', 'blue', 'green', 'orange', 'purple', 'white', 'gray']
for n in range(50):
# 选择随机的颜色
t.pencolor(random.choice(colors))
# 选择随机的大小(改改看看效果吧)
size = 19000000
# 在屏幕上选择随机坐标
x = random.randint((-300), 300)
y = random.randint((-300), 300)
t.penup()
t.goto(x, y)
t.pendown()
for m in range(size):
t.forward((m * 2))
# 可以试试可以更改角度看看哦
t.left(91)
i = 5
j = 7
print(i,'*',j,'=',(i*j))
\ 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