Commit 7c2466ae by BellCodeEditor

save project

parent 0e27d48d
Showing with 13 additions and 7 deletions
...@@ -17,19 +17,24 @@ else: ...@@ -17,19 +17,24 @@ else:
def new_input(): def new_input():
total=[] total=[]
while True: while True:
money =input("(q)") unit =input("(q)")
if money == 'q': if unit == 'q':
break break
else: else:
try: try:
money=int(money) unit=int(unit)
except: except:
print("") print("")
else: else:
total.append(money) total.append(unit)
finally: finally:
print("-"*30) print("=======")
return total
def sum(money)
count=0
for i in money:
count=count=i
return total
result=new_input() result=new_input()
print(result) print(result)
\ 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