def hotel_cost(nights): return 140 * nights def plane_ride_cost(city): if city == "Charlotte": # if the city is "Charlotte" return 183 # return 183 if city == "Tampa": # if the city is "Tampa" return 220 # return 220 if city == "Pittsburgh": # if the city is "Pittsburgh" return 222 # return 222 if city == "Los Angeles": # if the city is "Los Angeles" return 475 # return 475 def rental_car_cost(days): return 40 * days if testSomethingHere: #if True doSomethingElse
What seems to be the problem? It's not a guessing game! Tell us what you want a hand with!
My code doesn't run correctly. Please advise.
Ian Michael Jones
Can you elaborate on "not correctly"?
What does it do and what should it do differently?
It should calculate the cost of a rental car, but it doesn't.
Looks like it does some math and returns the result - so yeah, it does.
Do you think that it should behave differently from what it does with the current code?
If you agree with that it should behave like it is with the current code, then you'll need to change the code, riight? And then you know exactly what you need to be doing next. If there's a problem doing THAT, then THAT is what you'll have to be asking about, isn't it?
Have I misunderstood something?