Getting There (TAKING A VACATION)


#1

def hotel_cost(nights):
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

Oops, try again. Did you create a function called plane_ride_cost?
please help me with the error


#2

why surrounded it by quotes ("183")?
also check if your indentations are okay!


#3

def hotel_cost(nights):
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

is there anything wrong now??
Because the same error keeps popping up


#4

Everything is indented properly


#5

Charlotte and Tampa are strings?


#6

Thank you.Just did not pay attention to the Quotes.


#7

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