Commit 14a21cd0 by BellCodeEditor

save project

parent 30d04029
Showing with 16 additions and 13 deletions
a=[]
while True:
b=input('请输入')
if b == 'q':
break
else:
try:
b = float(b)
except:
print("重新输入!")
def new_input():
a=[]
while True:
b=input('请输入')
if b == 'q':
break
else:
a.append(b)
print("-"*30)
print(a)
try:
b = float(b)
except:
print("重新输入!")
else:
a.append(b)
print("-"*30)
return a
c=new_input()
print(c)
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