Commit fa61a2a4 by BellCodeEditor

save project

parent a75a5047
Showing with 12 additions and 4 deletions
...@@ -10,6 +10,14 @@ def new_input(): ...@@ -10,6 +10,14 @@ def new_input():
unit=int(unit) unit=int(unit)
except: except:
print('重新输入') print('重新输入')
else:
total.append(unit) total.append(unit)
print(total) return total
\ No newline at end of file def sum(unit):
c=0
for i in unit:
c=c+i
return c
re=new_input()
pay=sum(re)
print("zhifu"+str(pay))
\ 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