Commit 5a00d1bb by BellCodeEditor

save project

parent 34b46b7d
def thisissbhome():
total =[]
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("maths")
else:
total.append(unit)
print("-"*30)
print(total)
thisissbhome()
\ No newline at end of file
import kil
price=kil.home()
pay=kil.sum(price)
print("您一共消费了"+str(pay)+"元!扫码还是支付?")
\ No newline at end of file
def home():
total =[]
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("maths")
else:
total.append(unit)
finally:
print("-"*30)
return total
# resurn = home()
# print(resurn)
def sum(price):
count=0
for i in price:
count=count+i
return count
\ 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