I need help please!


Hi everyone,
i’m new to coding, i think it’s a silly question but i don’t know what’s the error here, please helppp


You need to be careful about tabs because python uses them to put code in the proper block. Your code says that the “for” is part of an import block. It is not. so if the “for” aligned with the import, the code runs properly:

import random
for i in range(5):

This is what the error message is actually saying, though often error messages can be hard to interpret.

This question might be better in a python forum, as it is a language question, not an editor question :slight_smile:


Thank you for the tips !!