While you're at it


#1

my code is not working. someone explain what’s wrong. it gives th error: File “python”, line 4
num += 1
^
IndentationError: unindent does not match any outer indentation level



num = 1
while num <= 10:  
	print num ** 2
  num += 1



#2

python is sensitive to white space so write the num += 1 exactly under the print function !
the code works:
111|690x209


Loop incremental
#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.