Commit c04537ed by BellCodeEditor

save project

parent 4517bae9
Showing with 12 additions and 8 deletions
def new_input(): def new_input():
total = [1] total = [1]
while True: while True:
unit=input("请输入:(Q提出)") money=input("请输入:(Q提出)")
if unit == 'q': if money == 'q':
break break
else: else:
try: try:
unit = int(unit) money = int(money)
except: except:
print("小明问没问") print("小明问没问")
else: else:
total.append(unit) total.append(money)
print("-"*30) finally:
print(total)
new_input() print("-"*30)
\ No newline at end of file
return total
resuit=new_input()
print(resuit)
\ 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