Why do I get a syntax error?

I had a problem on this particular lesson where I wrote the correct code, like so:

def movie_review(rating):
  if rating <= 5:
    return "Avoid at all costs!"
  if rating > 5 and rating < 9:
    return "This one was fun."
  	return "Outstanding!"

and yet a SyntaxError message appeared suggesting that there was something wrong with the less than arrowhead before 9 on line 4. Now I had no idea what I did wrong, but I was for sure right for the most part. I am just curious if it was me who got the code wrong or Codecademy

Inconsistent indentation could be the problem.


Python lets us write inequalities…

if 5 < rating < 9:

which gives matched relational operators.

Since you are using return in each if statement, no else is required.

if ...:
    return ...
if ...:
    return ...
return "Outstanding!"