Commit d116724b by BellCodeEditor

save project

parent fe8a40e6
import func
\ No newline at end of file
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit1=int(unit)
except:
print('你在想啥?输入整数')
else:
total.append(unit1)
return total
def sum(SB):
count=0
for i in SB:
count=count+i
return count
# price=new_input()
# pey=sum(price)
#print('你花费'+str(pey)+'元买了……')
......
import func
data=func.new_input()
score=func.sum(data)
print('这位憨憨的分数是'+str(score)+'!')
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