Commit 5de35b81 by BellCodeEditor

auto save

parent 1422ea3b
Showing with 21 additions and 3 deletions
......@@ -5,5 +5,18 @@ def new_input():
if unit== 'q':
break
else:
total.append(unit)
print(total)
\ No newline at end of file
try:
unit = int( unit )
except:
print("请输入整数啊!")
else:
total.append(unit)
return total
def sum(money):
count = 0
for i in money:
count += i
return count
# a = new_input()
# b = sum( a )
# print( "您共需支付:" , b )
\ No newline at end of file
import func
a = func.new_input()
b = func.sum(a)
print("游泳总成绩是",b)
\ 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