Pull it together


#1

Someone plz help!
I have problems!
it says this

def hotel_cost(nights):
    nights = input("How many nights will you be staying? ")
    return 140*nights

def plane_ride_cost(city):
    if city == "Charlotte":
        return 183
    elif city == "Tampa":
        return 220
    elif city == "Pittsburgh":
        return 222
    elif city == "Los Angeles":
        return 475

def rental_car_cost(days):
    rent = 40 * days
    if days >= 7:
        rent -= 50
    elif days >=3:
        rent -= 20
    return rent
    
def trip_cost(city, days):
    return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city)

Oops, try again. hotel_cost(1) raised an error: unexpected EOF while parsing (<string>, line 0)


#2

Often problems arise out of the code that is not asked for in the first place. This may be one of those times.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.