Can you find an error in my code


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


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


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



A post was split to a new topic: Plane rid