viligen

burger_bus

Oct 25th, 2021
664
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. city_number = int(input())
  2.  
  3. total_profit = 0
  4. for city in range(1, city_number + 1):
  5.     city_name = input()
  6.     income = float(input())
  7.     expenses = float(input())
  8.     if city % 3 == 0 and city % 5 != 0:
  9.         expenses *= 1.5
  10.     if city % 5 == 0:
  11.         income *= 0.9
  12.  
  13.     profit = income - expenses
  14.     print(f"In {city_name} Burger Bus earned {profit:.2f} leva.")
  15.     total_profit += profit
  16.  
  17. print(f"Burger Bus total profit: {total_profit:.2f} leva.")
  18.  
RAW Paste Data