Commit b7300ecd by BellCodeEditor

save project

parent dc70412a
Showing with 84 additions and 0 deletions
def func():
total = []
while True:
unit= input("请输入(按q退出):")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入数字啊!!!。")
else:
total.append(unit)
finally:
print("="*50)
print("*"*50)
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
price=func()
pay=sum(price)
print("一共消费了"+str(pay)+"元 owo")
import turtle
pen=turtle.Pen()
screen=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()
pen.circle(200)
pen.left(2)
i+=1
turtle.done()
\ No newline at end of file
def new_input():
total = []
while True:
unit= input("输入(q退出)")
if unit== 'q':
break
else:
try:
money = int(money)
total.append(unit)
print(total)
new_input()
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