Commit 8d142c8d by BellCodeEditor

save project

parent c7672bf7
Showing with 19 additions and 11 deletions
def new_input():
total = []
total = [] while True:
def a(): unit= input("请输入单价(q退出):")
while True: if unit== 'q':
unit= input("请输入:") break
if unit== 'q': else:
break try:
else: unit=int(unit)
total.append(unit) except:
print(total) print("请重新输入一个数字")
try:
pass
else:
pass
total.append(unit)
print(total)
a() a()
\ 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