+ 1
Explain this below error in description
Traceback (most recent call last): File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module> start(fakepyfile,mainpyfile) File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 42 if choice ==2: ^ IndentationError: unindent does not match any outer indentation level [Program finished]
4 Respuestas
+ 11
RAAGESH KANNAN R N
It would be good if you can attach the code too!
+ 3
You should show your code
That we can easily find out more errors in your code
in your code indentation error occurred in below if choice==2:
+ 2
Ok
+ 2
Python code can be indented with tabs or spaces. It’s up to you.
Python only has an objection when you use both spaces and tabs to indent your code. Python requires you use only one method of indentation. This is because the language is statically typed. Statically typed programming languages are sticklers when it comes to syntax.
Indentation errors are a difficult one to understand because it involves the invisible: mixing spaces and tabs. Depending on the code editor you are using, you may not even be able to see whether spaces or tabs have been used until you delete your indents from your code.
IndentationErrors are common when you copy code snippets from the internet. Every developer has their own preference when it comes to indentation and you’ll often find code snippets do not adhere to your own preferences. Some snippets will indent with spaces.
If a code snippet you copy into your program uses a different type of indentation, you will see an IndentationError in your code.