Commit 92375e7b by BellCodeEditor

save project

parent 6d88eca4
Showing with 31 additions and 0 deletions
def new_input():
total = []
while True:
money=input("Please import:(If you depress U, it will break.)")
if money== 'q':
break
else:
try:
money=int(money)
except:
print("Please import a number again.")
else:
total.append(money)
finally:
print("_"*30)
return total
result=new_input()
print(result)
def sum(money):
count=0
for i in money:
count=count+i
return count
price=new_input()
pay=sum(price)
print("You should pay"+str(pay)+"dollars! What kind of payment do you choose?")
\ 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