Commit 223160ca by BellCodeEditor

save project

parent dc70412a
Showing with 14 additions and 0 deletions
def add_sum():
money = []
count = 0
while True:
a = input("请输入价格,结束请输入q\n")
if a == "q":
break
else:
money.insert(0,int(a))
for i in money:
count = count + i
return(count)
print("您本次消费共"+str(add_sum())+"元")
\ 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