+ 1

What is indentation and how to do it .please do not share links , write the answer

28th Jun 2018, 5:47 PM
Paradox
Paradox - avatar
5 Answers
+ 5
Each statement has zero or more spaces before the first non-space. This is the indentation of that statement. Some languages ignore it and others require it. But, it is always a good idea to make use of it. This is an example: class p { int z; } The starting and ending line have an indent of zero spaces. The property of the class has an indent of 2 spaces. There are many different forms of indentation used by programmers. The most important part is consistancy. Coding like this: class p { int z; } while perfectly legal, will confuse yourself and others. The normal indent is 4 spaces and IDE's make tabs a single indent. I tend to use 2 spaces as coding on a phone with 4 takes up a lot of display space. For the courses you have started, Python does require indent, while Java does not.
28th Jun 2018, 6:08 PM
John Wells
John Wells - avatar
+ 3
Soubhagya indentation in coding is either 4 spaces " " or the tab button
28th Jun 2018, 6:05 PM
LONGTIE👔
LONGTIE👔 - avatar
0
indentation ÉȘndɛnˈteÉȘʃ(ə)n/ noun 1. the action of indenting or the state of being indented. "paragraphs are marked off by indentation" 2. a deep recess or notch on the edge or surface of something. "coastal indentations"
28th Jun 2018, 5:56 PM
Lstiti
0
What is our in python
28th Jun 2018, 5:57 PM
Paradox
Paradox - avatar
0
https://docs.python.org/2.0/ref/indentation.html
28th Jun 2018, 5:59 PM
Lstiti