Commit f953eead by BellCodeEditor

save project

parent 1a596e57
Showing with 24 additions and 0 deletions
def getlist():
total = []
while True:
s = input('请输入:')
try:
price = int(s)
except:
print("请输入数字。")
else:
total.append(price)
return total
def sum(lis):
s = 0
for i in lis:
s += i
return s
import poki
list=poki.get_list()
total=poki.sum(lis)
print(total)
\ 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