Hello guys, im trying to learn Python and the tutorials in this page are really helping me, however im having problems with how to write the code. In the exercice Taking a vacation i got a weird error:
def rental_car_cost(**days**): cost = (days * 40) if days >= 7: cost = cost-50 elif days >= 3: cost=cost-20 return cost
This code is the answer to the exercie, and mine had just 1 minor difference, the last line "return cost" was 1 space to the right and this was giving me an error.
My question is: Is this sort of code arrangement error very common on python? or is it just a thing with how the exercices in codecademy are programed?
I'd really like to know because i got stuck on this exercise trying a bunch of different ways to make it work and none of them were correct and i wanted to know if my logic to program is failin me or the way the tutorials are programed. (sorry for my bad english)