0
IndentationError : expected an indented block in pyton
How to solve it ???? IndentationError : expected an indented block https://sololearn.com/compiler-playground/ckZJbCdhI343/?ref=app
5 Answers
+ 4
The error is due to the fact that you have not identified the code correctly, the indentation refers to, for example, if you receive a song and you must give 3 spaces so that you can enter what you want to be shown if the condition is met
+ 1
It means your indentation is wrong. You need to check the indentation of your code blocks.
+ 1
This is not correcting in mobile .
+ 1
in python white space matters!
every "code block" should have the same indentation....
PS: after fixing this issue, you will face another problem in this code
+ 1
RayBan ,
Look for the colons. Every line ending with a colon (":") needs an indented block of at least one statement below it (not counting empty lines).
You can use the pass keyword to supply a do-nothing statement that satisfies the required code block until you fill it in later.
Also, for readability, it's good practice to separate class definitions with two empty lines and separate method definitions with one empty line to give visual cues of the hierarchy.
class C:
def f(self):
pass
def g(self):
pass
class D:
def h(self):
pass
def i(self):
pass