Keep getting "Your code looks a bit off


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/loops/exercises/while-youre-at-it?action=lesson_resume&link_content_target=interstitial_undefined

<In what way does your code behave incorrectly? Include ALL error messages.>
Error : Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: unexpected indent (python, line 7)

<What do you expect to happen instead?>

num = 1

while num < 11:  # Fill in the condition
  # Print num squared
  print num ** 2
  # Increment num (make sure to do this!)
  num += 1
print "Done"

https://www.codecademy.com/courses/learn-python/lessons/loops/exercises/while-youre-at-it?action=lesson_resume&link_content_target=interstitial_undefined


#2

That line is not asked for. Suggest remove it and only write code that is asked for.

As for the indentation, that should be alright, but to be sure, remove all indents and reinsert four spaces for each. The comments may be removed, as they are not needed.


#3

I get that error a lot, even though the indentation is automatic. Deleting and tabbing (or adding spaces) manually always fixes it though.


#4

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