Commit 30df0758 by BellCodeEditor

save project

parent 4ec5328f
import func
res=func.test()
print(res)
sum=cal(res)
print("总分是"+res(sum))
\ No newline at end of file
......@@ -17,6 +17,3 @@ def cal(money):
for i in money:
total += i
return total
list=o()
totalmoney = cal(list)
print("总价是"+str(totalmoney))
\ No newline at end of file
def o():
def o():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
try:
unit=int(unit)
except:
print("滚,穷鬼")
break
else:
total.append(unit)
return total
def cal(money):
total = 0
for i in money:
total += i
return total
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