Hey, You Never Know! 6


#1

If I went on vacation for 10 days and spent 20 dollars a day, spending_money was supposed to represent $200. What am I doing wrong?

If I remove line 3 that says: "spending_money*=days", my code works fine.

My code returns the error message: "Oops, try again. trip_cost('Charlotte', 4, 38) returned 1035 instead of the correct value 921". This error message returns random cities and numbers every time I try the code.

Thank you!

def trip_cost(city, days, spending_money):
    nights=days
    spending_money*=days
    return rental_car_cost(days) + hotel_cost(days) + plane_ride_cost(city) + spending_money

#2

Suggests it's the total for the whole trip, right?


#3

Yeah. I mean I did the exercise fine but I wanted to write a different code where spending_money represented the amount of money spent in ONE DAY instead of total for the whole trip


#4

Which is fine. Makes sense even.
You just won't pass the submission test, since that checks for what's described in the instructions.

Am I missing something here?