Ask coding questions

← Back to all posts
3
tab error
h
RossJames (6)

hi,

I have no idea why i have an error on line 14. Any ideas?

thanks!

Answered by TheDrone7 (516) [earned 5 cycles]
View Answer
Commentshotnewtop
2
TheDrone7 (516)

The indentation has to be applied after the colon. So according to that the correct format would be

cnt = 1
while line:
	print("Line {}: {}".format(cnt, line.strip()))
1
RossJames (6)

@TheDrone7 Hi, I have added this but now have more any ideas?

1
TheDrone7 (516)

@RossJames I believe you need to declare variables outside of that scope, although I am not sure.

1
AsadHumayun (0)

@RossJames Error on Line 14? Maybe you don't need an empty line or you have to declare something. I would recommend using an online Python code checker.

1
kamalhasan (6)

what language is this
also check out tic tac toe with bots

1
AllAwesome497 (80)

Ah, ok. now ur current problem
is on one line, or maybe more, u didn't use tabs/spaces whichever u used everywhere else