DiYane

Account Balance 5/9

Aug 10th, 2021
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. total = 0
  2. command = input()
  3.  
  4. while command != 'NoMoreMoney':
  5.     current_num = float(command)
  6.  
  7.     if current_num < 0:
  8.         print('Invalid operation!')
  9.         break
  10.  
  11.     total += current_num
  12.     print(f'Increase: {current_num:.2f}')
  13.     command = input()
  14. print(f'Total: {total:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment