-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
Introduction to Python
Python Basics
Python Syntax
Python Comments
Python Variables
Python Data Types
Python Casting
Python I/O
Python Operators
Cotrol Structures
Data Structures
Python Strings
Python Lists
Python Tuples
Python Dictionaries
Python Sets
Python Arrays
Python Bytes and Bytearray
Date and Time
Functions and Module
File Handling
Python OOP
Advanced Concepts
Python Scope
Python Modules
Python JSON
Python RegEx
Python PIP
Python Try...Except
Python String Formatting
Python User Input
Python VirtualEnv
Python Math
Python DSA
Python DSA
Lists and Arrays
Python Stacks
Python Queues
Linked Lists
Python Hash Tables
Python Trees
Python Binary Trees
Binary Search Trees
Python AVL Trees
Python Graphs
Searching Algorithms
Sorting Algorithms
To write and run Python programs, you need a Python editor or IDE (Integrated Development Environment). Two commonly used tools for this are:
Python IDLE – Comes built-in with Python.
Visual Studio Code (VS Code) – A powerful and customizable editor from Microsoft.
Let’s explore both and understand how to set them up.
IDLE (Integrated Development and Learning Environment) is the default editor that comes with Python installation.
Install Python from python.org
Open IDLE:
On Windows: Search for "IDLE"
On macOS/Linux: Run idle
in terminal
Comes with a Python shell (interactive interpreter)
File editor with syntax highlighting
Easy to test and run code quickly
Good for beginners
Open IDLE
Click File > New File
Write your code, e.g.:
print("Hello from IDLE!")
Save the file (e.g., hello.py
)
Press F5 or go to Run > Run Module
VS Code is a lightweight and extensible code editor developed by Microsoft. It supports Python through an extension.
Download and install VS Code
Open VS Code and go to Extensions (Ctrl+Shift+X
)
Search and install "Python" extension by Microsoft
Install Python from python.org
Create a new .py
file and start writing code:
print("Hello from VS Code!")
Open a terminal in VS Code: `Ctrl+```
Run the script:
python filename.py
Syntax highlighting
IntelliSense (smart code suggestions)
Debugging support
Git integration
Works with many languages
Feature | IDLE | VS Code |
---|---|---|
Built-in with Python | ✅ Yes | ❌ No (needs install) |
Beginner Friendly | ✅ Very Easy | ⚠️ Slight learning curve |
Extensions/Add-ons | ❌ No | ✅ Yes (many) |
Debugging Tools | Basic | Advanced |
Recommended For | Beginners | Intermediate & Advanced |
Q1. Write a Python program to print your name.
Q2. Write and run a program that adds two numbers.
Q3. Create a program that prints today’s date.
Q4. Write a program to calculate area of a rectangle.
Q5. Use input() to take user’s name and print a greeting.
Q6.Write a program that calculates square of a number.
Q7. Write and run a script to reverse a string.
Q8. Create a Python file that checks if a number is even or odd.
Q9. Write a script that prints numbers from 1 to 10.
Q10. Create and run a program to convert Celsius to Fahrenheit.
Introduction to Python
Python Basics
Python Syntax
Python Comments
Python Variables
Python Data Types
Python Casting
Python I/O
Python Operators
Cotrol Structures
Data Structures
Python Strings
Python Lists
Python Tuples
Python Dictionaries
Python Sets
Python Arrays
Python Bytes and Bytearray
Date and Time
Functions and Module
File Handling
Python OOP
Advanced Concepts
Python Scope
Python Modules
Python JSON
Python RegEx
Python PIP
Python Try...Except
Python String Formatting
Python User Input
Python VirtualEnv
Python Math
Python DSA
Python DSA
Lists and Arrays
Python Stacks
Python Queues
Linked Lists
Python Hash Tables
Python Trees
Python Binary Trees
Binary Search Trees
Python AVL Trees
Python Graphs
Searching Algorithms
Sorting Algorithms