Commit e353a5c7 by BellCodeEditor

save project

parent 4327fa72
import func
date=func.new_input()
score=func.sum(date)
print('分数'+str(score))
...@@ -11,12 +11,14 @@ def new_input(): ...@@ -11,12 +11,14 @@ def new_input():
print('请输入数字') print('请输入数字')
else: else:
total.append(unit) total.append(unit)
print("_"*30) return total
return total print("_"*30)
def sum(money): def sum(money):
count=0 count=0
for i in money: for i in money:
count=count+1 count=count+i
return count
price=new_input() price=new_input()
pay=sum(price) pay=sum(price)
print('一共'+str(pay)+"元") print('一共'+str(pay)+"元")
......
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