Commit cee33f4b by BellCodeEditor

save project

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