Created
June 7, 2016 19:32
-
-
Save ophiuchus44/1e95c555f047b0f8e90bc2ff68afbfb8 to your computer and use it in GitHub Desktop.
Rental Car
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 carCost(days): | |
if days >= 7: | |
return (days*40.0-50.0) | |
elif days >= 3 and days <=6: | |
return (days*40.0-20.0) | |
else: | |
return (days*40.0) | |
def convertUS(days): | |
return carCost(days)/.78347 | |
#carCost(2) | |
#def dailyCost(days): | |
# return carCost(days)/days | |
day_trials = [1,2,5,7,8] | |
map(convertUS, day_trials) | |
#day_trials = [1,2,5,7,8] | |
#zip(map(carCost, day_trials), map(dailyCost, day_trials)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment