Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ophiuchus44/1e95c555f047b0f8e90bc2ff68afbfb8 to your computer and use it in GitHub Desktop.
Save ophiuchus44/1e95c555f047b0f8e90bc2ff68afbfb8 to your computer and use it in GitHub Desktop.
Rental Car
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