Chapter 3: Python Development Tools & IDEs

Configure VS Code, Jupyter Notebook, and Python environments. Learn how to use professional programming tools effectively.

VS CodeJupyter NotebookPython SetupVirtual EnvironmentDebugging
VS Code
Editor
Jupyter
Notebook
Python
Environment
Debug
Tools

3.1 Chapter Overview

Professional Python programming requires proper tools to write, run, test, debug, manage and document programs. This chapter focuses on Python, Visual Studio Code, Jupyter Notebook and Python environments.

Key Idea: A professional programmer uses the right tools to write cleaner code, detect errors, test programs, manage projects and improve productivity.

3.2 Chapter Objectives

  • Understand Python development tools and IDEs.
  • Install and configure Python.
  • Configure Visual Studio Code for Python programming.
  • Use Jupyter Notebook for interactive Python learning.
  • Create and manage Python virtual environments.
  • Use terminals, debugging and professional project structures.

3.3 What are Python Development Tools?

Python development tools are software applications that help programmers write, execute, test and manage Python programs.

Code Editor

A tool used to write and edit code. Example: Visual Studio Code.

IDE

An Integrated Development Environment combines editor, debugger, terminal and project tools.

Notebook

An interactive coding document used for Data Science, AI and learning.

Terminal

A command-line tool used to run Python commands and manage packages.

3.4 Installing and Configuring Python

  1. Download Python from the official Python website.
  2. Run the installer.
  3. Tick Add Python to PATH.
  4. Click Install Now.
  5. Open terminal and check version.
python --version
Example Output:
Python 3.12.0
Important: If terminal cannot recognize Python, Python may not be added to PATH.

3.5 Configuring Visual Studio Code for Python

VS Code is a lightweight and powerful editor widely used by Python developers.

  1. Install Visual Studio Code.
  2. Open Extensions.
  3. Install Python extension.
  4. Install Pylance extension.
  5. Create a project folder.
  6. Create a .py file.
  7. Select the correct Python interpreter.

First Python File

# hello_pdtc.py
print("Welcome to PDTC Python Programming")
print("Python Development Tools and IDEs")
Output:
Welcome to PDTC Python Programming
Python Development Tools and IDEs

3.6 Important VS Code Extensions

ExtensionPurposeUsefulness
PythonAdds Python support.Required for Python coding in VS Code.
PylanceSmart code analysis.Improves completion and error detection.
JupyterSupports notebooks.Useful for AI and Data Science.
GitLensGit history and teamwork.Useful for professional projects.

3.7 Jupyter Notebook

Jupyter Notebook is an interactive tool used to run Python code in cells. It is widely used in Data Science, AI and Machine Learning.

  • Run code step by step.
  • Write explanations using Markdown.
  • Display charts, tables and outputs below code cells.

Install Jupyter

pip install notebook

Start Jupyter

jupyter notebook

Example Notebook Cell

name = "Amin"
course = "Python for AI"
print(f"{name} is learning {course}")

3.8 Python Environments

A Python environment is a setup where Python and its packages are installed. Professional developers use separate environments to avoid package conflicts.

Create Virtual Environment

python -m venv pdtc_env

Activate on Windows

pdtc_env\Scripts\activate

Install Package

pip install pandas

3.9 Debugging in Python Tools

Debugging is the process of finding and fixing errors. VS Code provides breakpoints, step controls, variable inspection and debug console.

FeaturePurpose
BreakpointPauses code at a selected line.
Step OverRuns the next line of code.
Variables WindowShows current variable values.
Debug ConsoleTests commands during debugging.
number1 = 10
number2 = 0
result = number1 / number2
print(result)
Error:
ZeroDivisionError: division by zero

3.10 Professional Project Folder Structure

PDTC_Python_Project/
├── main.py
├── README.md
├── requirements.txt
├── data/
│   └── students.csv
├── notebooks/
│   └── analysis.ipynb
├── src/
│   └── student_app.py
└── outputs/
    └── report.txt
Best Practice: Use meaningful file and folder names. Avoid file1.py or test2.py for final work.

3.11 Hands-On Practice

Activity 1: Python Installation Check

Open terminal and run python --version.

Activity 2: VS Code Setup

Install VS Code, Python extension and Pylance. Create and run hello_pdtc.py.

Activity 3: Jupyter Notebook

Create one Markdown cell and one Python code cell.

Activity 4: Virtual Environment

Create pdtc_env and install one package using pip.

3.12 Final Assessment Quiz

Correct Answer = +1 Mark. Wrong Answer = -0.5 Mark.

1. VS Code can be used as a professional Python code editor.

2. Python files should normally use the .py extension.

3. Jupyter Notebook is useful for Data Science and AI learning.

4. The terminal can be used to run Python commands.

5. Virtual environments help avoid package version conflicts.

6. Debugging helps programmers find and fix errors.

7. Pylance provides smart Python code analysis and suggestions.

8. Professional projects should use meaningful folder and file names.

9. Python packages are commonly installed using pip.

10. Jupyter Notebook cannot run Python code cells.

Your Score: 0

3.13 Chapter Summary

In this chapter, learners studied Python development tools and IDEs. They learned how to configure Python, VS Code, Jupyter Notebook and virtual environments, and how to use debugging, terminals and professional project folders.

Remember: Professional tools help programmers write better code and prepare for real-world software development.