Https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/transportation-?action=lesson_resume


#1

https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/transportation-?action=lesson_resume

Below your existing code, define a function called rental_car_cost with an argument called days.

Calculate the cost of renting the car:

Every day you rent the car costs $40.
if you rent the car for 7 or more days, you get $50 off your total.
Alternatively (elif), if you rent the car for 3 or more days, you get $20 off your total.
You cannot get both of the above discounts.
Return that cost.

Just like in the example above, this check becomes simpler if you make the 7-day check an if statement and the 3-day check an elif statement.


#2

So what problem are you having?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.