- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
VS Code and Python
This lab walks through the essential parts of a Python installation and VS Code setup by turning them into a small, testable Python project. You will implement environment checks, VS Code configuration recommendations, a Hello World script runner, and a simple Python-shell arithmetic evaluator so you can understand how the pieces fit together before writing larger Python programs.
Lab Info
Table of Contents
-
Challenge
Step 1: Explore the Python Setup Project
Welcome to the lab. This project mirrors the beginning of any Python learning journey: checking whether Python is installed, choosing the correct command for your OS, configuring VS Code, and running a first
Hello Worldfile. Rather than clicking through a real installer, you will encode those setup decisions in a small, testable Python project so you understand what each step actually does.The starter project is split into a few small modules under
app/.environment.pyhandles version logic.workspace.pymodels the course folder..vscode/stores editor configuration.hello.pyis the first runnable script, and later modules show how to run it and simulate shell arithmetic. Tests are organized by step so each group maps to the skills you are building.What you'll accomplish
- Build logic that recognizes installed, missing, and outdated Python versions.
- Configure VS Code workspace files for Python development.
- Create and run a
hello.pyscript through the active interpreter. - Finish with an integrated setup summary covering the full workflow.
-
Challenge
Step 2: Check Whether Python is Installed and Usable
Before opening an editor, a practical first step is running
python --versionorpython3 --versionin the terminal. In this step, you will encode that logic inapp/environment.py: parsing the raw version string into structured data, choosing the right command for the platform, and producing a plain-English status message a learner can act on.What you'll accomplish
- Parse Python version text into a structured object.
- Recommend the correct version-check command for Windows or Mac.
- Produce a report that says whether Python is missing, outdated, or ready to use. With version parsing in place, you can now decide which command to recommend. Now combine both pieces into a human-readable status report. You now have a complete environment-checking layer. In the next step, you will shift to editor setup by modeling VS Code's folder and Python configuration.
-
Challenge
Step 3: Configure the VS Code Workspace for Python
After confirming Python is installed, the next step is opening a project folder in VS Code, installing the Python extension, and selecting the interpreter. Teams often commit
.vscodefiles to source control so new developers get the right tool recommendations automatically — that's what you're building here.What you'll accomplish
- Create a helper for the
Python courseworkspace folder. - Recommend the official Microsoft Python extension in VS Code.
- Point the workspace at a Python 3.13 interpreter. With the workspace folder named, make the editor more helpful by recommending the Python extension. Last, tell the extension which interpreter to use. The project now models a complete VS Code Python workspace. In the next step, you will create and run
hello.py.
- Create a helper for the
-
Challenge
Step 4: Write and Run Your First Python File
Once Python is available and the workspace is configured, the next move is to create
hello.pyand run it. That moment confirms the whole toolchain works. In this step, you will build the message insidehello.pyand write a small runner that launches the script with the active interpreter — the code equivalent of pressing Play in VS Code.What you'll accomplish
- Return the exact Hello World message from the first Python script.
- Run
hello.pywith the current interpreter and capture its output. The script now knows what to display. The next task proves it can actually run. You have completed the classic beginner loop: write a file, run it, see the output. The last step extends this with shell-style math and a full setup summary.
-
Challenge
Step 5: Simulate the Python Shell and Wrap Up the Setup
The final step recreates two more parts of a typical Python onboarding: typing quick math expressions into the Python shell to verify it works, and reviewing a checklist of everything you set up. You will also see how the small focused functions from earlier steps compose into a higher-level summary — a pattern common in real onboarding tools.
What you'll accomplish
- Evaluate simple shell-style arithmetic safely with
ast. - Generate an integrated summary of the full Python and VS Code setup workflow. With a safe arithmetic evaluator in place, the final task uses every helper you built to produce a complete setup summary. You have finished the lab. Starting from raw version output, you built a small but complete onboarding project that understands Python installation status, models VS Code setup, runs a first script, and safely demonstrates simple shell math. As a next step, try expanding
hello.pywith input handling or additional print statements to continue from environment setup into core Python language practice.
- Evaluate simple shell-style arithmetic safely with
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.