Commit fe4d7716 by BellCodeEditor

auto save

parent 5525e854
Showing with 36 additions and 12 deletions
diy={"苹果":12,"香蕉":21,"西瓜":15} import turtle
while True: turtle.pencolor("blue")
d=input("今日水果") turtle.fillcolor("white")
r=input("价格") turtle.begin_fill()
if d in diy: turtle.circle(20)
if diy[d] > int(r): turtle.end_fill()
print("降价了") turtle.penup()
else: turtle.goto(50,0)
print("不买") turtle.pendown()
else: turtle.pencolor("black")
diy[d]=int(r) turtle.begin_fill()
\ No newline at end of file turtle.circle(20)
turtle.end_fill()
turtle.penup()
turtle.goto(100,0)
turtle.pendown()
turtle.pencolor("red")
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
turtle.penup()
turtle.goto(25,-25)
turtle.pendown()
turtle.pencolor("yellow")
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
turtle.penup()
turtle.goto(75,-25)
turtle.pendown()
turtle.pencolor("green")
turtle.begin_fill()
turtle.circle(20)
turtle.end_fill()
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