Why does my code produce an error in this image?


#1

https://www.codecademy.com/courses/learn-python/lessons/taking-a-vacation/exercises/transportation-
Any help appreciated. I have been looking over and comparing my code to Codecademy’s multiple times, and I fail to see what is wrong with my code.


#2

At first glance I don’t see a problem with line 18 sometimes the interpreter can get a little wonky. My suggestion would be to reset the exercise and manually retype your code and to be careful with your indentation.


#3

Okay, thank you. When I copy-pasted the code into a a text editor, the indentation was all wrong, but it doesn’t appear wrong in the codecademy interpreter for some reason, so you are probably right.


#4

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