New Cohort Summer 2026 Tech Internships are now open! Limited seats available.
← Course Detail

Python Programming

Computer Science

Chapter 1 — Introduction to Python

Progress: 8%

Lesson 1.5 : Python Syntax and Indentation

Reading & Interactive Lesson

Lesson 1.5 FREE

Python Syntax and Indentation

Reading Material & Notes

What is Python?

This lesson explains What is Python? as part of Introduction to Python in the Python Programming course. It introduces the core concepts, terminology, workflow, and practical use of the topic.

Python Syntax and Indentation

Python uses a simple and readable syntax. One of its important characteristics is that indentation is used to define blocks of code.

Important Concepts

  • Understand the definition and purpose of the topic.
  • Learn the important terminology and components.
  • Understand the typical workflow or implementation steps.
  • Identify practical use cases and common mistakes.
  • Practice the concept with a small exercise.

Indentation

Indentation means the spaces at the beginning of a line. Python uses indentation to identify statements belonging to a block.

Example

age = 20 if age >= 18:    print("Adult")

The indented print statement belongs to the if block.

Comments

Comments are used to explain code and are ignored during program execution.

# This is a single-line comment name = "Python"  # Store language name

Identifiers

Identifiers are names used for variables, functions, classes and other programming elements.

Basic Rules

  • Identifiers can contain letters, digits and underscores.
  • An identifier cannot start with a digit.
  • Python identifiers are case-sensitive.
  • Keywords should not be used as identifiers.

Key Points

  • Indentation is important in Python.
  • Consistent indentation makes programs readable.
  • Use practical examples to reinforce the concept.
  • Python uses a colon to introduce many code blocks.

 

 

Course Curriculum

10 Chapters • 50 Lessons

View Course

Chapter 4 — Loops and Iteration

5 Lessons

LOCKED
Lesson 4.1 : Introduction to Loops
ENROLL
Lesson 4.2 : for Loop
ENROLL
Lesson 4.3 : while Loop
ENROLL
Lesson 4.4 : break, continue and pass
ENROLL
Lesson 4.5 : Nested Loops
ENROLL

Chapter 5 — Functions and Modules

5 Lessons

LOCKED
Lesson 5.1 : Introduction to Functions
ENROLL
Lesson 5.2 : Function Parameters and Arguments
ENROLL
Lesson 5.3 : Return Values and Scope
ENROLL
Lesson 5.4 : Lambda Functions
ENROLL
Lesson 5.5 : Python Modules and Packages
ENROLL

Chapter 6 — Lists, Tuples, Sets and Dictionaries

5 Lessons

LOCKED
Lesson 6.1 : Introduction to Lists
ENROLL
Lesson 6.2 : Tuples in Python
ENROLL
Lesson 6.3 : Sets in Python
ENROLL
Lesson 6.4 : Dictionaries in Python
ENROLL
Lesson 6.5 : Choosing the Right Collection
ENROLL

Chapter 7 — Strings and File Handling

5 Lessons

LOCKED
Lesson 7.1 : Python Strings
ENROLL
Lesson 7.2 : String Methods and Formatting
ENROLL
Lesson 7.3 : Reading Text Files
ENROLL
Lesson 7.4 : Writing and Appending Files
ENROLL
Lesson 7.5 : Working with CSV Files
ENROLL

Chapter 8 — Exception Handling

5 Lessons

LOCKED
Lesson 8.1 : Introduction to Exceptions
ENROLL
Lesson 8.2 : try and except
ENROLL
Lesson 8.3 : else and finally
ENROLL
Lesson 8.4 : Raising Exceptions
ENROLL
Lesson 8.5 : Creating Robust Python Programs
ENROLL

Chapter 9 — Object-Oriented Programming

5 Lessons

LOCKED
Lesson 9.1 : Introduction to Object-Oriented Programming
ENROLL
Lesson 9.2 : Classes and Objects
ENROLL
Lesson 9.3 : Constructors and Instance Methods
ENROLL
Lesson 9.4 : Inheritance
ENROLL
Lesson 9.5 : Polymorphism and Encapsulation
ENROLL

Chapter 10 — Python Projects and Applications

5 Lessons

LOCKED
Lesson 10.1 : Planning a Python Project
ENROLL
Lesson 10.2 : Python Project Structure
ENROLL
Lesson 10.3 : Working with APIs
ENROLL
Lesson 10.4 : Building a Small Python Application
ENROLL
Lesson 10.5 : Testing and Deploying a Python Project
ENROLL

Python Programming

Chapters

10

Lessons

50

View Course Details