Commit 62dc7e92 by BellCodeEditor

save project

parent 14ea4e21
Showing with 8 additions and 43 deletions
import turtle diab={'可口可乐':10,'巴西烤肉':5,'奥利奥':19,'虾条':9}
pen=turtle.Pen() a=input("您要买什么?")
pen.fillcolor("red") if a in diab:
print('可口可乐'(diab[a]))
screen=turtle.Screen() else:
screen.bgcolor("pink") print ("您要的物品不存在")
pen.write("老师好",font=("Times",30,"normal")) \ No newline at end of file
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.begin_fill()
pen.left(45)
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
pen.end_fill()
turtle.done()
\ No newline at end of file
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
len=screen.textinput("100","100")
len=int(len)
pen=turtle.Pen()
pen.write("你好\nSB.",font=("Times",30,"normal"))
pen.hideturtle()
len=60
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
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