IndentationError error in Python
Hi, I wrote this pumpkin but it gives me an indentation error. I don't know where the problem is. Can you help?
IndentationError: expected an indented block
for i in range(5):
print(i)
Hi, I wrote this pumpkin but it gives me an indentation error. I don't know where the problem is. Can you help?
IndentationError: expected an indented block
for i in range(5):
print(i)
Problem of not using indentation (alignment) on the lineprint(i)Is. You should align this line with one surface (usually 2 intervals or one tab). The correct code is as follows:
for i in range(5):
print(i)
Well, one of the important rules of the Python language is:
It should be used after the statements or functions that or any ... which is then used.
We have to put as much as 4 spies or a distance tab.
The correct code is this
for i in range(5):
print(i)
The order you want to run inside the elaboral should be ahead of that phrase above
Hi again. Remember the gaps in Python. For example you can't say:
def hello():
print("Hello world!")
To write rings and functions, you need to leave 4 spies or spaces before their body.
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.