question question quesion question question quesion
range1= range(10)
for n in range1
print(2**n,end=" ")
why this doesnt work?
3 answers ( 0 marked as helpful)
Print's functionality is to display specified data, not operate on data. Feel free to correct me if I'm wrong.
you have not put indented block for loops place and also parenthesis
Hi Shiva!
Thanks for reaching out.
You missed the colon (:
) after the for loop. Please, use the following code:
range1=range(10)
for n in range1:
print(2**n,end=" ")
Hope this helps.
Best,
Tsvetelin