Commit f84ce129 by BellCodeEditor

save project

parent 61a3e291
......@@ -19,7 +19,7 @@ def sum(money):
for i in money:
money=money+i
return money
-
q=total1()
w=sum(q)
print(str(w)+'元')
\ No newline at end of file
def total():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
a=int(unit)
except:
print("请重新输入")
else:
total.append(unit)
print(total)
total()
\ No newline at end of file
import func
a=func.total1()
b=func.sum(a)
print(b)
\ 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