rozalina1988

5_Account_balace

Nov 13th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. new_input = input()
  2. total_sum = 0
  3. while new_input != "NoMoreMoney ":
  4. if float(new_input) < 0:
  5. print("Invalid operation!")
  6. break
  7.  
  8. print(f"Increase: {float(new_input)}")
  9. total_sum += float(input())
  10. new_input = input()
  11. print(f"Total: {total_sum:.2f}")
  12.  
Advertisement
Add Comment
Please, Sign In to add comment