Beginner to Intermediate | Exam Ready Study Material
(2026) (Part 1)
Introduction to Python
🔹 What is Python?
Python is a high-level, interpreted programming language that is easy to learn and widely
used across the world. It was created by Guido van Rossum and released in 1991.
Python is known for its simple syntax, which makes it perfect for beginners who are starting
their programming journey.
Unlike many other programming languages, Python allows you to write programs with fewer
lines of code, making it easier to understand and faster to develop.
🔹 Why Learn Python?
Python is one of the most popular programming languages today. Here’s why:
✅ Easy to learn for beginners
✅ Used in multiple fields
✅ Large community support
✅ High demand in jobs
✅ Saves time with simple syntax
Whether you want to become a software developer, data scientist, or automation expert,
Python is a great starting point.
🔹 Applications of Python
Python is used in many real-world applications:
🌐 Web Development (Django, Flask)
📊 Data Science and Analytics
✅ Artificial Intelligence & Machine Learning
🎮 Game Development
✅ Automation and Scripting
📱 Desktop Applications
This makes Python a versatile and powerful language.
🔹 Installing Python
To start coding in Python, you need to install it on your computer.
1
,Step 1: Go to the official website: https://www.python.org
Step 2: Download the latest version of Python.
Step 3: Run the installer and check the box “Add Python to PATH”.
Step 4: Click on “Install Now” and complete the installation.
🔹 Verifying Installation
After installation, follow these steps:
1. Open Command Prompt (Windows)
2. Type: python --version
3. Press Enter
If Python is installed correctly, you will see the version number.
🔹 Writing Your First Python Program
Now, let’s write your first Python program.
Example:
print("Hello, World!")
Output:
Hello, World!
This simple program displays a message on the screen.
🔹 Understanding the Code
print() is a built-in function in Python
It is used to display output
Text inside quotes (" ") is called a string
🔹 Running a Python Program
You can run Python programs in two ways:
1. Using IDLE (Python Editor)
Open IDLE
Type your code
Press Enter
2
,2. Using Command Prompt
Save file as hello.py
Open Command Prompt
Navigate to the file location
Run:
python hello.py
🔹 Summary
What Python is
Why Python is popular
Where Python is used
How to install Python
How to write and run your first program
Basics of Python
🔹 Keywords and Identifiers
✅ Keywords:
Keywords are reserved words in Python that have special meaning.
Examples:
if, else, while, for, True, False, None
👉 You cannot use keywords as variable names.
✅ Identifiers
Identifiers are the names given to variables, functions, or objects.
Rules for identifiers
Must start with a letter or underscore _
Cannot start with a number
Cannot use keywords
Case-sensitive (name ≠ Name)
Example:
name = "Rahul"
_age = 21
3
, 🔹 Variables and Data Types
A variable is used to store data.
Example:
name = "Smith"
age = 20
marks = 85.5
is_passed = True
Common Data Types:
int → Integer (10, 20)
float → Decimal (10.5, 3.14)
str → String ("Hello")
bool → Boolean (True/False)
🔥 Example
x = 10
y = 5
print(x + y)
Output:
15
🔥 Example
name = "Python"
print("Welcome to", name)
Output:
Welcome to Python
🔹 Taking User Input
Python allows users to enter data using input().
Example
name = input("Enter your name: ")
print("Hello", name)
🔥 Example (Important):
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
print("Sum is:", a + b)
4