Commit 6e521972 by BellCodeEditor

save project

parent ba8b0c05
Showing with 8 additions and 7 deletions
...@@ -10,16 +10,16 @@ def name(): ...@@ -10,16 +10,16 @@ def name():
except: except:
print("输入错误") print("输入错误")
else: else:
total.append(unit) total.append(unit)
print("-"*30) #print("-"*30)
return total return total
print(total)
name() aa=name()
def sum(unit): def sum(t):
count = 0 count = 0
for i in unit: for i in t:
count = count+1 count = count+1
return count return count
price=name() pay = sum(aa)
pay = sum(price)
print("您一共消费了" + str(pay)+"元!") print("您一共消费了" + str(pay)+"元!")
\ 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