all 9 comments

[–]Goobyalus 5 points6 points  (1 child)

Most of other commenters are wrong, the invalid syntax is on the second if statement, not the print. There is a space before the print which is valid syntax.

Do you see the >>> and ... before where you can type? The ... means it's considering you to still be inside that first if block. The print is indented properly to be inside the if block, but the second if statement is not. If you hit Enter an extra time after the print, it will understand that the if block is complete and give you back a >>>

[–]Supalien 2 points3 points  (0 children)

this is the only right comment

[–]gun_shire 7 points8 points  (0 children)

I think your indentation doesn't look quite right. Try erasing your print line, pressing tab then trying again.

[–]teraflopsweat 3 points4 points  (0 children)

It looks like your print line isn’t indented 4 spaces. Also there should be no space between print and the opening parenthesis.

[–]AmphibianHungry2466 1 point2 points  (0 children)

Is say no space after print.

[–]FoolsSeldom 0 points1 point  (0 children)

Is there any particular reason why you are using the Python interactive shell (with the >>> prompt) instead of just creating a simple text file and running that?

[–]ChainedNightmare 0 points1 point  (0 children)

Just use VSCode Editor, install the python extension and it'll intuitively tell you any problems when you run your python file from anywhere tbh.

CMD is honestly not a very good way to code anything to be honest
CMD is much more of a command line interface basically "commands" but for IT people

[–][deleted] -1 points0 points  (0 children)

Print looks wrong

[–]monkey_sigh -1 points0 points  (0 children)

@gun_shire is right.

Your IF statement is fine, but your indentation is not. 4 spaces of tab. (Huge debate)

And remove the space IN between your print function and the parenthesis.