Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

Anyone else have issues running indenting in the Python shell? I can get the code to work for submission but cutting and pasting, but the shortcut (CNTRL + ] ) does not seem to function correctly. After first indent following "if" statement with print command, I cannot get the "else" line not to trigger syntax error. Probably overlooking something pretty obvious again...

MIT 6.00 Intro Computer Science (OCW)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

post the code that's giving the syntax error
Auto indent basically just indents the new line as much as the previous line. As good a guess as a machine can make. An else: clause is the same indentation as the if statement if belongs to. I dislike idle because it seems to use only spaces for indentation. I usually use tabs. They are not equivalent, and cause syntax errors that are hard to track down.
One tip in Idle is that if you use the 'Check Module' under the 'Run' menu it can sometimes help you find whitespace problems.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

write your code in an editing window instead of the shell File | New

Not the answer you are looking for?

Search for more explanations.

Ask your own question