Guest User

suitcases_load

a guest
Jul 16th, 2021
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. airplane_capacity = float(input())
  2. counter = 0
  3.  
  4. while True:
  5.     suitcase = input()
  6.  
  7.     if suitcase == "End":
  8.         print("Congratulations! All suitcases are loaded!")
  9.         break
  10.     else:
  11.         suitcase = float(suitcase)
  12.  
  13.     if suitcase > airplane_capacity:
  14.         print("No more space!")
  15.         break
  16.  
  17.     counter += 1
  18.     if counter % 3 == 0:
  19.         suitcase = round(suitcase + (suitcase * 10 / 100))
  20.     airplane_capacity -= suitcase
  21.  
  22. print(f'Statistic: {counter} suitcases loaded.')
RAW Paste Data