Commit b3aed780 by BellCodeEditor

save project

parent 3a5c01b0
Showing with 14 additions and 7 deletions
unit=0
i=0
def A(qw):
def A():
total = []
while True:
unit=input("请输入:")
......@@ -13,9 +13,16 @@ def A(qw):
print("请输入整数")
else:
total.append(unit)
for q in qw:
i+=q
return i
return total
qwe=to
A(total)
\ No newline at end of file
def you_can(money):
wq=0
for i in money:
wq=wq+i
return wq
print("請輸入價格,按‘q’退出")
x=A()
y=you_can(x)
z=str(y)
print("您的花費為:")
print(z+"元")
print("祝您用餐愉快!")
\ 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