1. Download and Install Python
Visit the official Python site at python.org and download the latest version. During installation, check the "Add Python to PATH" option.
2. Installing Visual Studio Code
Download Visual Studio Code from their official site. Install it with the default options.
3. Installing the Python Extension
Open VS Code, go to the extensions tab (Ctrl + Shift + X), search for "Python" and click install.
4. Environment Setup
To verify that Python is configured correctly, open a terminal in VS Code (Ctrl + `) and run:
python --version
5. Creating and Executing a Python Script
Create a new file with the extension .py
and write:
print("¡Hello world!")
Save it and run it from the terminal with:
python file_name.py
Conclusion
You now have Python fully installed and configured in Visual Studio Code. Start working through the Python exercises!