Teo_Yanchev

Untitled

Jul 4th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. command = input()
  2.  
  3. total_money = 0.0
  4.  
  5. while command != "NoMoreMoney":
  6. money = float(command)
  7. if money < 0:
  8. print("Invalid Operation!")
  9. break
  10.  
  11. print(f"Increase: {money:.2f}")
  12.  
  13. total_money += money
  14. command = input()
  15. print(f"Total: {total_money:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment