Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

iamarollercoasterdude

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...

  • one year ago
  • one year ago

  • This Question is Closed
  1. DrTacoPhD
    Best Response
    You've already chosen the best response.
    Medals 0

    post the code that's giving the syntax error

    • one year ago
  2. rsmith6559
    Best Response
    You've already chosen the best response.
    Medals 1

    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 year ago
  3. msmithhnova
    Best Response
    You've already chosen the best response.
    Medals 2

    One tip in Idle is that if you use the 'Check Module' under the 'Run' menu it can sometimes help you find whitespace problems.

    • one year ago
  4. bwCA
    Best Response
    You've already chosen the best response.
    Medals 0

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

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.