Transportaion Troubles!


#1



https://www.codecademy.com/courses/python-beginner-P5YtY/1/3?curriculum_id=4f89dab3d788890003000096

This is the error message: Oops, try again. It looks like rental_car_cost returns None instead of the correct amount (100) for 3 days.

I dont have a clue what is happening!!

I dont get it here is my code:
def rental_car_cost(days):
cost = days * 40
if days >= 7 and not days <= 3:
cost = cost - 50
elif days >= 3 and not days >= 7:
cost = cost - 20
else:
return cost

`


#2

@dylana88,
Apart from a comical condition

days >= 7 and not days <= 3

you are only return-ing something if your days are 1 or 2

Please re-edit your Post

  • leave one blank-line above of your code
  • select your code in the Post
  • then =click= on the </>-symbol-of-this-editor

Your code will then be in a pre-code state
and you will be able to make/present the proper indentations.

or even better use
= http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697/2
[extra's]
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet