Hey all. Ive been stuck on this for a while now. I even followed the help video line by line and copied it as is and it still did not work, i read other forms started over and over again and have been on this project for two days and to be fair i just want to move on. I understand why this project is here and I looked at so much help that i understand the code to a T but it still does not work and always comes up as syntax error with some line. If someone has the full code solution that worked and got them through the project i would love to have it or just see it since i somehow can not get past this project and i just want to learn more.
It looks like that line is on a different level of indentation to any other line. You’d want it in line with the
if statement and the following clauses (unless it’s supposed to be part of one).
Whilst you might want to move on I highly suggest maybe having a quick recap of functions as you’ll be using them often and you’d want to understand the syntax requirements. Take note of the indentation used and suggested by the guidance on the left hand panel.
I agree, it looks like both the return and print are indented one space.
Agree. It looks like line 12 & 13 are neither aligned with if-elif-else or the body. It’s hanging in between. That’s why the error says it does not match any outer indentation.
The indents on line’s 12 & 13 are off by a space. It may help to see the problem better by deleting the empty space in line 11 so that its easier to see if your code is off on indentation.
When I input the same code in terminal, I was able to run it several times without issue. By fixing the indent, the result looks like this: