Commit 5e8b7325 by BellCodeEditor

save project

parent 6ca89a8c
Showing with 13 additions and 6 deletions
......@@ -4,14 +4,21 @@ def new_input():
unit= input("请输入:")
if unit== 'q':
break
else:
try:
hss=int(unit)
unit1=int(unit)
except:
print('请输入数字')
else:
total.append(unit)
print(total)
finally:
print('===========')
return total
new_input()
re=new_input()
print(re)
\ No newline at end of file
def sum(money):
count=0
for i in money:
count=count+i
return count
price=new_input()
pay=sum(price)
print('您一共消费了'+str(pay)+'元')
\ 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