CodeSolved

Solved Programming Questions & Exercises

IndentationError error in Python

Technical question 2040/ Download 219 Views
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)

3 Answers

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
Aerf123 Download Python
Hi again. Remember the gaps in Python. For example you can't say:
def hello():
print("Hello world!")
To write rings and functions, you must leave 4 spaces or spaces before their body.
Macsepehri Download Python

Submit answer

Submitting answers is currently unavailable.

×
×
Close