Commit 1be2c773 by BellCodeEditor

auto save

parent df779b6f
Showing with 22 additions and 0 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
...@@ -6,3 +6,8 @@ while True: ...@@ -6,3 +6,8 @@ while True:
else: else:
total.append(unit) total.append(unit)
print(total) print(total)
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