A community for students. Sign up today!
Here's the question you clicked on:
 0 viewing
 2 years ago
there is always a problem in idle while using 'else'. it gives indentation error. please help
 2 years ago
there is always a problem in idle while using 'else'. it gives indentation error. please help

This Question is Closed

Joet99
 2 years ago
Best ResponseYou've already chosen the best response.0Make 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.

raviraj619
 2 years ago
Best ResponseYou've already chosen the best response.0"unindent does not match any outer indentation level" this the t shows always, i have tried in different ways.

TuringTest
 2 years ago
Best ResponseYou've already chosen the best response.1it should be like so if <boolean>: <code> else: <code>

raviraj619
 2 years ago
Best ResponseYou've already chosen the best response.0>>> x=35 >>> if x==35: print 'true' else: File "<pyshell#3>", line 3 else: ^ IndentationError: unindent does not match any outer indentation level

TuringTest
 2 years ago
Best ResponseYou've already chosen the best response.1well, the way you copypasted it I can't tell how your indents are written, the >>> is throwing me off.

raviraj619
 2 years ago
Best ResponseYou've already chosen the best response.0x=35 if x==35: print 'true' else: File "<pyshell#3>", line 3 else: ^ IndentationError: unindent does not match any outer indentation level

TuringTest
 2 years ago
Best ResponseYou've already chosen the best response.1I 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.

raviraj619
 2 years ago
Best ResponseYou've already chosen the best response.0thank you so much. its is very helpful,and it is woking

TuringTest
 2 years ago
Best ResponseYou've already chosen the best response.1glad that's all it was :)
Ask your own question
Ask a QuestionFind more explanations on OpenStudy
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
 Engagement 19 Mad Hatter
 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.