Taking a vacation 2


#1

does my code look right if it doesn't please reply

ef hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
return if city == "Los Angeles" print $475
elif:
city == "Annopolis" print $345
else:
print $0


#2

changed my code and it still doesn't work
here is my code:

def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):
if city == "Los Angeles"
return "$475"
elif city == "Charlotte"
return "$183"
elif city == "Pittsburgh"
return "222"
else city == "Tampa"
return "220"


#3

changed my code... again:

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


#4

wait i fixed it :smiley::laughing:


#5

Hi first you don't need the $ symbol and you should remove the " "around the numbers and you should put a : after your condition.... in the first case

if city == "Los Angeles":
return 475