Commit 41297587 by BellCodeEditor

save project

parent 49df63e4
Showing with 9 additions and 3 deletions
def count(): def count():
total = [] total = []
while True: while True:
price= input("请输入:") price=input('请输入:')
if price=='q': if price=='q':
break break
total.append(price) try:
price=int(price)
except:
print('输入整数!')
else:
total.append(price)
print(total) print(total)
count() 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