Commit b27af418 by BellCodeEditor

save project

parent 2e8773fd
Showing with 39 additions and 0 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~
import turtle
pen=turtle.Pen()
pen=turtle.Screen()
pen.speed('fast')
pen.hideturtle()
screen.bgcolor('black')
i=0
while i<135:
pen.pencolor('pink')
pen.penup()
pen.goto(0,0)
pen.forward(200)
pen.pendown()
screen.circle(100)
pen.left(2)
i+=1
turtle.done()
\ No newline at end of file
def price():
total = []
while True:
unit= input("请输入你菜品的价格,按q退出:")
if unit== 'q':
break
else:
try:
money=int(unit)
except:
print('请输入正确的数字!')
else:
total.append(unit)
print(total)
print('谢谢!')
price()
\ 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