0

I used Jupiter notebook, I am new in python, I just try this code and get error, I don't understand why i get this error

for i in range(1,10):
if i%3==0:
continue
print(i)

ERROR:File "", line 3 continue ^ Indentation Error: expected an indented block

aGreenCoder
  • 158
  • 3
  • 14
  • 1
    Reading out load `indentation Error: expected an indented block` might ring some bell. Just a tab key before `continue` – mad_ Feb 12 '19 at 14:26
  • You have multiple indentation errors in the code you show. Is that actually the code you tried to run? – Rory Daulton Feb 12 '19 at 14:26
  • Python is a strongly typed language, the indents are important to signify which code belongs in which block. Please refer back to your tutorials. – r.ook Feb 12 '19 at 14:26

1 Answers1

1

The indented code will be:

for i in range(1,10):
    if i%3==0:
        continue
    print(i)
harshil9968
  • 3,254
  • 1
  • 16
  • 26