Commit 0bd8f72b by BellCodeEditor

save project

parent 8c7e73ab
Showing with 9 additions and 4 deletions
......@@ -5,16 +5,21 @@ def new_input():
if unit== 'q':
break
else:
#total.append(unit)
try:
unit=int(unit)
except:
print("请输入一个整数")
else:
total.append(unit)
#print(total)
return total
lag=new_input()
print(lag)
def abc(last1):
count = 0
for i in last1:
count += i
return count
result = new_input()
pay=abc(result)
print("一共"p"元")
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