Commit b97c39db by BellCodeEditor

auto save

parent f8d6bddc
Showing with 8 additions and 23 deletions
def new_input(): def couet(money):
total = [] a=0
while True: for i in range(money):
unit = input("请输入(q退出):") a=a+1
return a
if unit == "q": money=[12,13,14]
break b=couet(money)
else: print(b)
try:
unit = int(unit)
except:
print("请重新输入一个数字")
else:
total.append(unit)
print("-"*30)
return total
a=new_input()
print(a)
price()
\ 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