Commit cee33f4b by BellCodeEditor

save project

parent d2d0ee87
Showing with 21 additions and 13 deletions
def new_input(): def new_input():
try: total = []
total = [] while True:
while True: unit=int(input("请输入,按p退出"))
unit=int(input("请输入:")) if unit== 'q':
if unit== 'q': break
break else:
except: try:
print('要输入整数') unit=int(unit)
else: except:
total.append(unit) print('要输入整数')
else:
new_input() total.append(unit)
print(total) print(total)
return total
price=new_input
print('=*30')
price(price)
s=0
for i in price:
s+=i
print(str(s))
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