desislava_topuzakova

01. Movie Profit

Nov 14th, 2020
822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.83 KB | None | 0 0
  1. # сума за билетите за ден -> бр. билети * цена за 1 билет
  2. # сума за билетите за всички дни -> сума за билетите за ден * брой дни
  3. # разход за киното -> % от сума за билетите за всички дни
  4. # печалба -> сума за билетите за всички дни  - разход за киното
  5.  
  6. movie_name = input()
  7. count_days = int(input())
  8. count_tickets = int(input())
  9. price_ticket = float(input())
  10. percent = int(input())
  11.  
  12. sum_tickets_per_day = count_tickets * price_ticket
  13. sum_tickets_all_days = sum_tickets_per_day * count_days
  14. sum_for_cinema = percent / 100 * sum_tickets_all_days
  15. profit = sum_tickets_all_days - sum_for_cinema
  16.  
  17. print(f"The profit from the movie {movie_name} is {profit:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment