Rental Car Returns 120. 4/7


#1

from math import *
def hotel_cost(n):
return hotel_cost(140*n)
def plane_ride_cost(c):
if plane_ride_cost(c) == "Charolette":
return str(183)
elif plane_ride_cost(c) == "Tampa":
return (220)
elif plane_ride_cost(c) == "Pittsburgh":
return str(222)
else:
return str(475)
def rental_car_cost(d):
costperday=40*d
return costperday
if d >= 7:
costperday -= 50
elif d >= 3:
costperday -= 20
else:
return costperday


#2

if you are having problems then its here

def rental_car_cost(d):
    costperday=40*d #awesome
    return costperday # after this method terminates
    
    ##whatever follows is unreacheable
    if d >= 7:
        costperday -= 50
    elif d >= 3:
        costperday -= 20
    else:
    return costperday

You probably wanna do this

def rental_car_cost(d):
    costperday = 40*d
	if(d >= 3 and d <= 6):
		return costperday -20
	elif (d > 6):
		return costperday - 50
	else:
		return costperday

#3

I give up on this stuff.