+ 1
I am using Microsoft visual studio. I type the code as instructed but I am having errors. I'm learning cpython. I need answers
systaxError: invalid syntax
6 Answers
+ 5
Yes. Indentations are part of the syntax which Python enforces.
+ 4
Post your code, perhaps?
+ 4
Indentations are whitespaces placed on the same line prior to your code. E.g.
#indented
#not indented
#indented similarly to line 1
#further indented
This means that Python groups codes with similar levels of indentations into a single block (instead of other languages which commonly utilises brackets. {} )
+ 1
I just got it right now. At first, when I type in the code. it was like this..
x = 4
if x == 5:
print("false")
else:
print("true")
but when I arrange it properly, it worked.
x = 4
If x == 5:
print("false")
else:
print("true")
0
That's alot I really didn't understand it clearly but I get it now... thanks for the support..
0
I am a bit confused.. Please can you explain it properly to me what does it really mean by the indentations?