Python Course Unit 1: Introduction to Programming in Python
1. Definition of Computer Science and Programming
Computer Science is the study of how information is represented, processed, and communicated through
computers. Programming is the practical act of giving computers instructions to solve problems or perform
tasks. It is both a science and an art: the science of understanding data and logic, and the art of designing
solutions in a clear, efficient way.
2. The Importance of Python in Economics
Python has become one of the most widely used programming languages in economics, finance, and data
science. Its popularity comes from its simplicity and powerful ecosystem of libraries (e.g., pandas, NumPy,
statsmodels, scikit-learn). Economists and analysts use Python to:
Process and analyze large datasets.
Model economic behaviors and simulate outcomes.
Automate repetitive tasks like data cleaning or report generation.
Apply statistical and machine learning techniques to real-world problems.
In short, Python bridges theory and practice by transforming raw data into meaningful insights.
3. Familiarization with the Working Environment (IDE)
A programmer’s efficiency depends heavily on the tools they use. Before we write our first line of code, we
must ensure our environment is correctly configured. This is a mandatory step.
*- Choosing the Right Tools (IDE vs. Notebooks)
You will interact with Python through a specialized editor. We recommend two main options:
Visual Studio Code (VS Code): A lightweight yet powerful editor with extensions for debugging,
version control, and Python development.
Jupyter Notebook: An interactive environment for running code in small chunks, perfect for data
analysis, visualization, and teaching.
Understanding how to navigate and use these environments is the first step toward becoming productive in
Python.
Exercise: Verify Installation
After installing Python, verify the setup using the command:
1- print("Python is installed successfully!") or
2- Python --version
Basic Education 1 Mrs. H. Belkhiri
Python Course Unit 1: Introduction to Programming in Python
4. Installing Python and Running the Editor
Before writing your first line of code, you need to set up your development environment:
Download and install Python from the official website.
Configure your IDE (VS Code or Jupyter).
Run your first Python script (e.g., print("Hello, World!")) to confirm that everything works.
This setup ensures you have the foundation needed to experiment, practice, and learn without
unnecessary technical roadblocks.
5. Introduction to Algorithms
Programming is not just about typing code—it’s about solving problems logically. This session focuses on
algorithms, which are step-by-step instructions for solving a problem. Key ideas include:
Breaking down complex problems into smaller, manageable steps.
Thinking in terms of inputs, processes, and outputs.
Writing pseudocode to design a solution before coding.
Understanding efficiency and why some solutions are better than others.
Basic Education 2 Mrs. H. Belkhiri