Advertisement
Guest User

Untitled

a guest
Jun 10th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. capacity = float(input())
  2. command = input()
  3. counter = 0
  4. is_space = True
  5. while command != "End":
  6.     number = float(command)
  7.     if capacity <= number:
  8.         print("No more space!")
  9.         is_space = False
  10.         break
  11.     capacity -= number
  12.     counter += 1
  13.     if counter % 3 == 0:
  14.         capacity -= number * 0.10
  15.  
  16.     command = input()
  17.  
  18. if is_space:
  19.     print("Congratulations! All suitcases are loaded!")
  20.  
  21. print(f"Statistic: {counter} suitcases loaded.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement