Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- road_disctance = 210 #km
- time_to_travel = 3 #days
- car_fuel_conspumtion = 7 #liters per 100 km
- gas_price = 1.85 #per liter
- money_for_food = float(input())
- money_gifts = float(input())
- money_for_hotel = float(input())
- gas_needed = (road_disctance * 2) / 100 * car_fuel_conspumtion
- money_for_gas = gas_needed * gas_price
- total_money_to_spend = (3 * money_for_food) + (3 * money_gifts)
- day_one_discount = money_for_hotel * 0.9
- day_two_discount = money_for_hotel * 0.85
- day_three_discount = money_for_hotel * 0.8
- total_expenses = money_for_gas + total_money_to_spend + day_one_discount + day_two_discount + day_three_discount
- print(f'Money needed: {total_expenses:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement