Commit e0602b28 by BellCodeEditor

save project

parent aaecce32
Showing with 8 additions and 5 deletions
def new_input():
total = []
while True:
unit= int(input("请输入:"))
if unit== 'q':
unit= input("请输入:")
if unit == 'q':
break
else:
try:
unit = innt(unit)
unit = int(unit)
except:
print("重输")
else:
total.append(unit)
return total
a = new_input()
sum = 0
for i in a:
sum+= i
print(sum)
prit(new_input())
\ 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