Commit 466ceae6 by BellCodeEditor

save project

parent d1326b4a
Showing with 21 additions and 3 deletions
def new_inpot():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请重新输入")
else:
total.append(unit)
print("#"*90)
print(total)
new_inpot()
\ No newline at end of file
...@@ -6,4 +6,5 @@ def new_inpot(): ...@@ -6,4 +6,5 @@ def new_inpot():
break break
else: else:
total.append(unit) total.append(unit)
print(total) print(total)
\ No newline at end of file new_inpot()
\ No newline at end of file
total = [] total = []
while True: while True:
unit= input("请输入:") unit= int(input("请输入:"))
if unit== 'q': if unit== 'q':
break break
else: else:
......
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