Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- capacity = float(input())
- command = input()
- counter = 0
- is_space = True
- while command != "End":
- number = float(command)
- if capacity <= number:
- print("No more space!")
- is_space = False
- break
- capacity -= number
- counter += 1
- if counter % 3 == 0:
- capacity -= number * 0.10
- command = input()
- if is_space:
- print("Congratulations! All suitcases are loaded!")
- print(f"Statistic: {counter} suitcases loaded.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement