Commit 1be2c773 by BellCodeEditor

auto save

parent df779b6f
Showing with 23 additions and 2 deletions
def new():
z=[]
while True:
a=input("请输入价格")
if a=="stop":
break
else:
try:
a1=int(a)
except:
print("请输入数字")
else:
z.append(a1)
print(z)
new()
\ No newline at end of file
...@@ -5,4 +5,9 @@ while True: ...@@ -5,4 +5,9 @@ while True:
break break
else: else:
total.append(unit) total.append(unit)
print(total) print(total)
\ No newline at end of file try:
a1=int(a)
except:
print("请输入数字")
\ 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