Commit f282a103 by BellCodeEditor

save project

parent e6696390
Showing with 17 additions and 73 deletions
def str(a)
def totl():
total = []
while True:
unit= input("请输入价格:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("你输入的不是整数")
else:
total.append(unit)
return total
a=totl()
print(a)
\ 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