0
if 10 > 5: print("10 greater than 5") print("Program ended")
i type this and it gives me a syntax error
2 odpowiedzi
+ 2
Just use semicolon after print statement otherwise use 2 .by using tab after inside if block.
#1.
if 10 > 5: print("10 greater than 5"); print("Program ended")
#i type this and it gives me a syntax error
#2.
if 10>5:
print("10 greater than 5"); print("Program ended")
+ 2
Check your python version else it is indentation error.