Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I AM STUCK ON STATEMENTS ASSIGNMENT #1

Open
Onyxsurfer opened this issue Mar 20, 2019 · 1 comment
Open

I AM STUCK ON STATEMENTS ASSIGNMENT #1

Onyxsurfer opened this issue Mar 20, 2019 · 1 comment

Comments

@Onyxsurfer
Copy link

I cannot get this to work correctly and am starting to get very frustrated. Any and all assistance is greatly appreciated!

age = 17
if age > 18:
print("Be sure to vote in the upcoming election!")
else: print("Be sure to vote when you turn 18!")

SyntaxError: unindent does not match any outer indentation level

@m-tripney
Copy link

m-tripney commented Nov 14, 2019

Python demands certain indentations. The code content is fine, but the indentations don't meet Python's requirements. If you try...

age = 17
if age > 18:
    print("Be sure to vote in the upcoming election!")
else:
    print("Be sure to vote when you turn 18!")

... it will work. You need to indent the statement(s) under the if block, and under the else block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants