Created
June 29, 2016 18:20
-
-
Save gamikun/ac93e67534e9075863dbc4842466644c to your computer and use it in GitHub Desktop.
CodeFights.UberBot.fareEstimator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fareEstimator(ride_time, ride_distance, cost_per_minute, cost_per_mile): | |
estimations = [] | |
for i, rtime in enumerate(ride_time): | |
rdist = ride_distance[i] | |
permin = cost_per_minute[i] | |
permile = cost_per_mile[i] | |
est = (rtime * permin) + (permile * rdist) | |
estimations.append(est) | |
return estimations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment