Commit f4478dff by BellCodeEditor

save project

parent 243c5a78
Showing with 9 additions and 112 deletions
def new_inpurt(): def new_input():
total = [] total = []
while True: while True:
money= input("请输入 (q退出):") money= input("请输入 (q退出):")
...@@ -6,119 +6,16 @@ def new_inpurt(): ...@@ -6,119 +6,16 @@ def new_inpurt():
break break
else: else:
try: try:
mone money=int(money)
except: except:
print("请输入一整形") print("请输入一整形")
else: else:
total.append(money) total.append(money)
print("_"*30) print("_"*30)
# print(result)
return total return total
result=new_inpurt() results=new_input()
print(result) m=0
\ No newline at end of file for i in results:
m=m+i
print(m)
\ 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