[Tutor] Codeacademy Problem
Chris “Kwpolska” Warrick
kwpolska at gmail.com
Mon Apr 29 18:01:09 CEST 2013
On Mon, Apr 29, 2013 at 5:28 PM, Joseph Parkton <jparkton at gmail.com> wrote:
> I tried both suggestions from Chris and I get Oops, try again! Did you
> create a function called trip_cost? Not really sure why
Your problem is: codecademy is dumb and its errors are, too.
>>> def trip_cost(city, days):
... totalCost = plane_trip_cost(city) + hotel_cost(nights) +
rental_car_cost(days)
There isn’t a “nights” parameter in your function, and you try to use
it for hotel_cost(). Replace it with days. And perform one of the
variants, ending up with:
def trip_cost(city, days):
return plane_trip_cost(city) + hotel_cost(days) + rental_car_cost(days)
--
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail | always bottom-post
http://asciiribbon.org | http://caliburn.nl/topposting.html
More information about the Tutor
mailing list