Commit 4341545f by BellCodeEditor

save project

parent 849aed6a
Showing with 15 additions and 3 deletions
...@@ -11,10 +11,15 @@ def input_food(): ...@@ -11,10 +11,15 @@ def input_food():
print('请重新输入') print('请重新输入')
else: else:
total.append(unit) total.append(unit)
finally:
print('-'*102) print('-'*102)
return total return total
def count(money):
mo=0
for i in money:
mo=mo+money
return mo
azs=input_food() azs=input_food()
print(azs) print(azs)
pp=count(azs)
print('你花费了'+str(pp)+'¥')
\ No newline at end of file
def hi(a):
s='你好!'+a
return s
c=hi('悟空')
print(c)
\ 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