Ads

Python Beginner Tutorial Part 1 – Setup & Your First Python Program

Learn Python from scratch by setting up your environment in VS Code, writing your first program, and initializing a Git repository step by step.

⏱ 39min 👁 63 views 📅 August 25, 2026

Summary

Why environment setup matters

Setting up a development environment is the first real challenge for anyone starting with Python. Unlike learning syntax through an online playground, configuring Python locally gives a learner control over the entire workflow. A proper setup includes installing the Python interpreter, choosing a code editor, and understanding how the terminal connects these pieces. This foundational step prevents confusion later when programs grow beyond a single file. Beginners often underestimate how much friction comes from a poorly configured environment, not from the language itself. When the toolchain is solid, the learning curve shifts entirely to programming concepts.

The tutorial emphasizes a clean, minimal setup using Python's official installer and Visual Studio Code. Visual Studio Code is particularly well suited for beginners because it balances simplicity with powerful extensions. The Python extension for VS Code adds IntelliSense, debugging, and linting without requiring manual configuration. By walking through installation, extension setup, and configuration in one continuous flow, the video removes ambiguity that frequently blocks new learners before they write a single line of code.

Installing Python and VS Code

The installation process begins with downloading Python from the official website. The video stresses the importance of checking the option to add Python to the system PATH during installation on Windows. Skipping this step leads to the common error where the terminal does not recognize the `python` command. On macOS, Python 3 is typically available through the bundled system installation, but the tutorial encourages a consistent approach across platforms. Verifying the installation with `python --version` in the terminal confirms the interpreter is accessible.

After Python is functional, the focus shifts to Visual Studio Code. The tutorial covers downloading the editor, installing it, and launching it for the first time. The next step is adding the official Python extension, which transforms VS Code from a generic text editor into a full Python IDE. The extension enables features like syntax highlighting, code completion, and running scripts directly from the editor. Setting up the editor correctly is an investment that pays off in every subsequent lesson of the series.

Creating the first Python project

Once the tools are in place, the tutorial demonstrates how to create a project folder and open it in VS Code. Organizing code into a dedicated folder is presented as a habit every programmer should form early. Inside this folder, the learner creates a file named `main.py`. The `.py` extension tells both the editor and the operating system that the file contains Python code. This structure, simple as it is, mirrors professional practice where projects are self-contained directories.

The tutorial also introduces the VS Code integrated terminal. Opening the terminal inside the editor avoids the need to switch between separate windows. Running `python main.py` from the terminal executes the file and displays the output in the same window. This workflow, where the terminal and editor coexist side by side, is the standard way developers run scripts during development. Learning it early builds muscle memory that scales to larger projects.

Writing and running the first program

The first program is intentionally simple: it prints text to the console using the `print()` function. This classic approach immediately shows a visible result, which builds confidence. The tutorial explains that `print()` is a built-in function that takes an argument and displays it as output. Strings are introduced as text enclosed in quotation marks, a concept that forms the basis for almost all later work with input and output.

Running the program through the terminal demonstrates how source code becomes executing software. The learner sees the code typed in the editor produce visible results in the terminal, closing the loop between writing and running. This moment is often cited by beginners as the point where programming starts to feel tangible. The tutorial also handles common errors, such as forgetting parentheses or using incorrect syntax, showing how Python reports mistakes and how to read basic error messages.

Basic Python syntax overview

After the first program runs successfully, the lesson introduces a few foundational syntax rules. Statements in Python are typically written one per line, and indentation is significant. Unlike other languages that use curly braces for code blocks, Python relies on consistent indentation, often four spaces, to define structure. This design choice makes Python code visually clean but requires attention from the very beginning. The tutorial demonstrates these principles with small, focused examples rather than overwhelming the learner with theory.

Case sensitivity is another key point: `Print()` and `print()` are not the same in Python. Following the standard conventions, built-in functions are lowercase. The video also touches on comments using the `#` symbol, showing how they document code without affecting execution. These small details form the basis for writing readable, correct Python code and prepare the learner for the next lesson on variables and data types.

Introduction to Git and GitHub

The tutorial includes a brief but practical introduction to version control using Git. Version control is a critical skill for any programmer, even at the beginner stage. The lesson covers initializing a Git repository inside the project folder with `git init`, adding files with `git add`, and creating a first commit with `git commit`. These commands track changes over time, making it possible to revert mistakes and collaborate with others later.

To complement the local workflow, the tutorial references a GitHub repository containing the source code for the entire series. Connecting a local Git repository to GitHub with `git remote add origin` and pushing changes with `git push` introduces the basics of remote collaboration. While Git can feel intimidating at first, the tutorial presents it as a tool that quickly becomes second nature. Learners who follow along finish the lesson with a project under version control, a habit that will serve them throughout their programming journey.

Where to go from here

Completing the setup and first program establishes a baseline for the entire Python Beginner Tutorial series. With the environment working and basic syntax understood, the next logical step is to learn about variables and data types. These concepts allow programs to store and manipulate information, unlocking far more interesting possibilities than simple printing. The series is structured to build on each lesson incrementally, so learners who complete this first part are well positioned to continue.

The resource files on GitHub provide additional practice material, including a solution file for Part 1. Reviewing these files reinforces the concepts introduced in the video. Rather than trying to memorize every detail, the tutorial encourages experimentation and repetition. Recreating the project from scratch without the video is an excellent way to solidify the workflow. Consistent practice, supported by the right tools and version control, turns a beginner into a capable Python programmer faster than any single tutorial alone.

What you will learn

  • Install Python and verify the installation via the terminal
  • Configure Visual Studio Code with the Python extension
  • Create and organize a Python project folder
  • Write and run a first Python program using print()
  • Understand basic Python syntax rules including indentation and comments
  • Initialize a Git repository and push the project to GitHub

Concepts covered

Technologies used

Chapters 9 markers

  1. Introduction to Python programming
  2. Installing Python on your system
  3. Setting up Visual Studio Code
  4. Installing the Python extension
  5. Creating the project folder and main.py
  6. Writing your first Python program
  7. Running Python from the integrated terminal
  8. Basic Python syntax and comments
  9. Introduction to Git and GitHub for your project

Next suggested video

Reviews

Student rating 0.0
0 reviews
Rate this lesson

Help other students decide if this lesson is useful.

No reviews yet. Be the first to rate this lesson.