Commit 48ed6915 by BellCodeEditor

auto save

parent 5f8a17ea
...@@ -11,7 +11,8 @@ def new_input(): ...@@ -11,7 +11,8 @@ def new_input():
print("请输入数字,不是非数字:") print("请输入数字,不是非数字:")
else: else:
list1.append(nuit) list1.append(nuit)
print('-'*30) finally:
print('=======================')
return list1 return list1
...@@ -20,8 +21,8 @@ def sum(money): ...@@ -20,8 +21,8 @@ def sum(money):
for i in money: for i in money:
count += i count += i
return count return count
if "__name__" == "__main__":
price = new_input() price = new_input()
total = sum(price) total = sum(price)
print("菜价总数是:",total) print("菜价总数是:",total)
import func
score = func.new_input()
sum_score = func.sum(score)
print("选手的分数为:",sum_score)
\ 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