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

raviraj619

there is always a problem in idle while using 'else'. it gives indentation error. please help

  • one year ago
  • one year ago

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

    Make sure you use tab to indent the IF and ELSE sections. I am assuming this is Python. You might have to paste your code snippet.

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

    "unindent does not match any outer indentation level" this the t shows always, i have tried in different ways.

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

    it should be like so if <boolean>: <code> else: <code>

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

    >>> x=35 >>> if x==35: print 'true' else: File "<pyshell#3>", line 3 else: ^ IndentationError: unindent does not match any outer indentation level

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

    well, the way you copy-pasted it I can't tell how your indents are written, the >>> is throwing me off.

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

    x=35 if x==35: print 'true' else: File "<pyshell#3>", line 3 else: ^ IndentationError: unindent does not match any outer indentation level

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

    I hope you're not typing this directly into the shell. Open a new window with CTRL+N and type in your program, then run it with F5. If that doesn't work, copy paste that code here so we can see the indentation properly, the >>> from the shell is making it hard to see what you actually typed.

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

    thank you so much. its is very helpful,and it is woking

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

    glad that's all it was :)

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