Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- airplane_capacity = float(input())
- counter = 0
- while True:
- suitcase = input()
- if suitcase == "End":
- print("Congratulations! All suitcases are loaded!")
- break
- else:
- suitcase = float(suitcase)
- if suitcase > airplane_capacity:
- print("No more space!")
- break
- counter += 1
- if counter % 3 == 0:
- suitcase = round(suitcase + (suitcase * 10 / 100))
- airplane_capacity -= suitcase
- print(f'Statistic: {counter} suitcases loaded.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement