Commit d03b1f35 by BellCodeEditor

save project

parent 65d922bf
Showing with 10 additions and 9 deletions
def new_input(): def new_input():
a=[] a=[]
while True: while True:
try: b=(input('请输入价格:(退出请按q)'))
b=int(input('请输入:(退出请按q)'))
except:
print('请输入整数!')
else:
print('-'*30)
if b=='q': if b=='q':
break break
a.append(b) else:
try:
b=int(b)
except:
print('请输入整数!')
else:
a.append(b)
print('-'*30)
print(a) print(a)
new_input() new_input()
\ 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