Trying to figure out how to make code in this QA look correctly formatted


#1

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


#2

Click here to find out how to format your code in a post


#3

Hi this part

if city == "Charlotte":
return 183
if city == "Tampa":
return 220
if city == "Pittsburgh":
return 222
if city == "Los Angeles":
return 475

After the fieat if statement the others statement should be elif.

Hint

if condition:
  // do Something 

elif condition:
  // do Something 
.......................