Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total = 0
- # command = "NoMoreMoney" OR "45.45"
- # stop - > if command == "NoMoreMoney"
- # continue -> command != "NoMoreMoney"
- # repeat: sum like a number - IF
- # if < 0 -> stop
- # if >= 0 print sentence -> add to sum
- command = input()
- while command != "NoMoreMoney":
- total = float(command)
- if total < 0:
- print("Invalid operation!")
- break
- else:
- print(f"Increase: {total:.2f}")
- total_sum += total
- command = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement