Yupp I totally agree on the errors. I finally had to change the
def hotel_cost(nights):
nights = nights * 140
return nights
to
def hotel_cost(nights):
return hotel_cost(nights) * 140
for it to work. Strange errors but decent exercises for beginners.
On Mon, Apr 29, 2013 at 10:01 AM, Chris “Kwpolska” Warrick <
[email protected]> wrote:
> On Mon, Apr 29, 2013 at 5:28 PM, Joseph Parkton <[email protected]>
> 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
>
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor