Commit a5cd100f by BellCodeEditor

save project

parent 21edd9ca
import func
list=func.new_input()
a=func.sum(list)
print(a)
\ No newline at end of file
...@@ -13,7 +13,16 @@ def new_input(): ...@@ -13,7 +13,16 @@ def new_input():
total.append(unit) total.append(unit)
finally: finally:
print("_ "*30) print("_ "*30)
print(total) # print(total)
return total return total
o=new_input() def sum(list):
print(o) w=0
for i in list:
w=w+i
return w
# o=new_input()
# print(o)
# s=sum(o)
# print("您购买的商品:",s)
\ 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