2 Answers
2
answers
What is indentation? List the types of indentation.
0
Answer link
Indentation refers to the blank spaces at the beginning of a line of code. It is used to create a visual structure that reflects the logical structure of the code, making it easier to read and understand. Indentation is especially important in programming languages like Python, where it is used to define blocks of code.
Different types of indentation are used in writing:
-
First Line Indent:
- The first line of a paragraph is indented, while the rest of the paragraph is aligned to the left margin.
-
Hanging Indent:
- Also known as a negative indent, where the first line of the paragraph starts at the left margin, and all subsequent lines are indented.
-
Left Indent:
- The entire paragraph is indented from the left margin.
-
Right Indent:
- The entire paragraph is indented from the right margin.
-
Left and Right Indent:
- The entire paragraph is indented from both the left and right margins.