Familiarity with the Python Environment Python syntax and indentation
11 February 2025

Familiarity with the Python Environment: Python Syntax and Indentation
Python follows a clean and simplex syntax, which makes it easy to read and write. One of its defining features is the use of indectation to define blocks of code, rather than relying on curly braces{} or keywords like begin and end.
Key Syntax Features:
•Case Sencitivity: Python in case-Sensitive (variable and variable are diffrenent).
•Statements and Line Breaks: Each statement typically appears on a new line, but multiple statements can be separated using a semicolon ;.
•Comments:
-Single-line comments start with #.
-Multi-line comments can be written using trple quotes(''' or """).
•Variables: No need for explicit type declaration; Python determines the type dynamically.
x=10 #Integer
name="Python" #String
Indentation in Python:
•Python uses indentation to define the structure of code blocks.
•A consistent number of spaces (typically ffour) must be used for indentation.
•Improper indentation results in an IndentationError.
Example :
if True:
print("Indented correctly")
else:
print("Wrong indentation")
Python's reliance on indentation ensures code readability and enforces a clean coding style.