Can you find an error in my code


#1

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

im doing a python course “taking a vacation” and can you find an error in my code

    def rental_car_cost(days):
  return days + 40
  if 7:
    return days - 50
  elif 3:
    return days - 20

#2

Indentation looks a little off…

7 or more days

3 or more days

That is going to exit the function immediately with the wrong value.

cost = days * 40

#3

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


#4

#5

A post was split to a new topic: Plane rid


#6