- 1
Expected an indented block (python)
Im trying to write a basic code from things i learned in the web, however whenever i try to run it, it gives me that error, any ideas what is it? (Im really new to coding)
2 odpowiedzi
+ 7
Yup. Python likes to make sure that you properly space and indent throughout your entire code. Kinda like a teacher with a ruler that constantly smacks your hands for doing things your way instead of theirs.
Basically, make sure that you have EXACT amount of whitespaces/indentation for all of your code. Otherwise your code won't run like it would in all of the other languages I know.
+ 6
If you want help with a particular bit of code, you can save it in the Code Playground and share it so we can check it out (three dots in the corner -> share -> copy to clipboard -> paste in Q&A with your question)