Advertisement
Merucial

Sea Trip

Mar 22nd, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. road_disctance = 210 #km
  2. time_to_travel = 3 #days
  3. car_fuel_conspumtion = 7 #liters per 100 km
  4. gas_price = 1.85 #per liter
  5.  
  6. money_for_food = float(input())
  7. money_gifts = float(input())
  8. money_for_hotel = float(input())
  9.  
  10. gas_needed = (road_disctance * 2) / 100 * car_fuel_conspumtion
  11. money_for_gas = gas_needed * gas_price
  12. total_money_to_spend = (3 * money_for_food) + (3 * money_gifts)
  13.  
  14. day_one_discount = money_for_hotel * 0.9
  15. day_two_discount = money_for_hotel * 0.85
  16. day_three_discount = money_for_hotel * 0.8
  17.  
  18. total_expenses = money_for_gas + total_money_to_spend + day_one_discount + day_two_discount + day_three_discount
  19. print(f'Money needed: {total_expenses:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement