Commit 712e3420 by BellCodeEditor

save project

parent c2c1c2a5
Showing with 11 additions and 4 deletions
def uu(): def 价格():
total = [] total = []
while True: while True:
unitunit=input("请输入:") unitunit=input("请输入:")
...@@ -7,5 +7,12 @@ def uu(): ...@@ -7,5 +7,12 @@ def uu():
else: else:
total.append(unitunit) total.append(unitunit)
return total return total
a=uu() a=价格()
print(a) print(a)q
\ No newline at end of file def 求和(n):
b=0
for i in n:
b+=int(i)
return b
m=求和(a)
print(m)
\ 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