Commit 4468a76f by BellCodeEditor

save project

parent a6ca047b
Showing with 9 additions and 4 deletions
def price(): def price():
jiage = [] jiage = []
while True: while True:
danjia = input("") danjia = input("请输入价格")
try: try:
if danjia == 'p': if danjia == 'p':
break break
else: else:
jiage.append(int(danjia)) jiage.append(int(danjia))
except: except:
input("读的是陈国华测试大幅") input("请输入整数")
print(jiage) print(jiage)
return jiage return jiage
price() price()
\ No newline at end of file def sum(money):
count = 0
for i in money:
count = count + i
return count
\ 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