Commit 3bd5f1c2 by BellCodeEditor

save project

parent bae41ef6
Showing with 70 additions and 0 deletions
'''name=input("g")
you=input("p")
hobby=input("d")
print("你好",name,"我喜欢在",you,"做",hobby)
name=input("你的名字是什么")
you=input("你最喜欢的地方是什么")
hobby=input("你的爱好是什么")
print("你好",name,"我喜欢在",you,"做",hobby,"你呢?")
u=input("你好,主任,有什么问题吗?")
print("你提出的",u,"我不会")
u=input("你")
if u=="无"
print("拜拜")'''
color=input("请输入五角星的颜色")
size=int(input("请输入五角星的大小(整数):"))
import turtle
t=turtle.Pen()
t.pencolor(color)
t.pensize(size)
t.fillcolor(color)
t.begin_fill()
for i in range(5):
t.forward(234)
t.right(144)
t.end_fill()
turtle.done()
import turtle
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
pen.left(90)
pen.up()
pen.backward(150) # 后退
pen.down()
def tree(n):
if n>=50:
pen.forward(n)
pen.right(30)
tree(n-90)
pen.left(60)
tree(n-90)
pen.right(30)
pen.penup()
pen.backward(n)
pen.pendown()
tree(150)
'''pen.forward(100)
pen.right(30)
pen.forward(50)
pen.backward(50)
pen.left(60)
pen.forward(50)
pen.left(-20)
pen.up()
pen.backward(150) # 后退
pen.down()'''
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