Commit 724a0ef3 by BellCodeEditor

save project

parent 6d88eca4
Showing with 20 additions and 0 deletions
total = []
def new_price(a):
while True:
unit= input("请输入:")
if unit== 'q':
print("程序结束")
break
else:
try:
unit=int(unit)
a.append(unit)
except:
print("程序错误")
break
return total
# print(total)
s=new_price(total)
print(s)
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