Commit 304827b3 by BellCodeEditor

save project

parent 29ba5712
Showing with 124 additions and 21 deletions
# total = [] def get_list():
# while True: total = []
# unit= input("请输入:") while True:
# if unit== 'q': s = input('请输入:')
# break if s == 'q':
# else: break
# total.append(unit) try:
# print(total) price = int(s)
total = [] except:
while True: print('请输入数字')
unit = input("请输入:") else:
if unit == "q": total.append(price)
break return total
try:
unit = int(unit) print(get_list())
except:
print("黑小伙子,请输入数字呀!")
else:
total.append(unit)
\ 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