Write a function that describes the cost to have your vehicle towed if you are charged $15 for the pickup plus $2 for every mile.
def towing_cost(miles):
pickup_cost = 15
per_mile_cost = 2
total_cost = pickup_cost + per_mile_cost * miles
return total_cost
so whats the equation?
The equation to calculate the towing cost, given the number of miles, can be written as:
Total Cost = Pickup Cost + (Per Mile Cost * Number of Miles)
In this case, the Pickup Cost is $15 and the Per Mile Cost is $2.