Commit d03b1f35 by BellCodeEditor

save project

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