Commit dc4f79c3 by BellCodeEditor

save project

parent cfcf87dd
Showing with 6 additions and 6 deletions
def new_input(b): def new_input():
a=0 a=0
return b
total=[] total=[]
while True: while True:
unit = input("请输入:") unit = input("请输入:")
if unit == 'q': if unit == 'q':
for j in total:
a+=j
b=a
break break
else: else:
try: try:
...@@ -14,9 +16,6 @@ def new_input(b): ...@@ -14,9 +16,6 @@ def new_input(b):
else: else:
total.append(unit) total.append(unit)
print('-'*30) print('-'*30)
for i in unit: return b
a+=i
b=a
return total
i=new_input() i=new_input()
print(i) print(i)
\ 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