Skip to content
syntax error?
Profile icon

it says on line 56 there is a syntax error with a print statement although there is nothing wrong? can someone please help me

You are viewing a single comment. View All
Answered by Coder100 [earned 5 cycles]
View Answer
Profile icon

i don't know why it says syntax error can someone help me.
for i in range (1, 101):
print(i, end=' ')
if i%3 == 0:
if i%5 == 0:
print("Fizz Buzz")
elif i%5 == 0:
print('not dividable')

Profile icon

do you have correct tab spacing? if so, it might be the end='' in the print statement, which you can just move out of the print statement, the first if statement after the first print statement doesnt have anything after it, so if you want it to do nothing, you can put "continue"(no quotations) after the if statement. im not an expert by any means, I am only self taught and am still in high school, but these might be possible problems in your code.