(Jun-06-2018, 06:36 PM)Larz60+ Wrote: indents are 4 spaces per level.
In addition, you need at least a 'pass' command after each condition
if console == 'y': # Placeholder pass else if console == 'Y': # Placeholder pass else if console == 'n': # Placeholder pass else if console == 'N': # Placeholder pass
I have 4 spaces per indent, but i added the pass.
Now it highlights the if in
else if console == 'Y':instead of the else
I'm getting
Error:Invalid Syntax
instead ofError:Expected an Indented Block
as well.(Jun-06-2018, 09:16 PM)Panda Wrote:(Jun-06-2018, 06:36 PM)Larz60+ Wrote: indents are 4 spaces per level.
In addition, you need at least a 'pass' command after each condition
if console == 'y': # Placeholder pass else if console == 'Y': # Placeholder pass else if console == 'n': # Placeholder pass else if console == 'N': # Placeholder pass
I have 4 spaces per indent, but i added the pass.
Now it highlights the if in
else if console == 'Y':instead of the else
I'm getting
instead of
Error:Invalid Syntax
as well.
Error:Expected an Indented Block
I made a mistake in my coding. I code in Atom, but run programs in IDLE, so the file didn't save when i added the pass. The program runs successfully.
Self-taught HTML, CSS, Python, and Java programmer