Welcome to ACT-370.1.1! In this activity, we will guide you through the process of installing Python and Visual Studio Code on your Windows machine. We will also discuss the advantages of using Python in a Windows environment and introduce Visual Studio Code as an Integrated Development Environment (IDE) for Python programming. Let's get started!
Before we begin, ensure that you have administrative access to your Windows machine. This will allow you to install software and make necessary configuration changes.
To download Python, follow these steps:
- Open a web browser and visit the official Python website at https://www.python.org/.
- Click on the Downloads tab located on the top menu.
- Scroll down and click on the "Python X.X.X" button (replace "X.X.X" with the latest version number) for the Windows platform.
- On the next page, scroll down again and select the appropriate installer for your system architecture (32-bit or 64-bit). Most modern machines use the 64-bit version.
- Click on the installer to start the download. The file will be saved to your computer.
Once the download is complete, follow these steps to install Python:
- Locate the downloaded installer file and double-click on it to run the installer.
- On the first page of the installer, make sure the option "Add Python X.X to PATH" is selected. This will add Python to your system's PATH variable, allowing you to run Python from any command prompt.
- Click on the "Install Now" button to begin the installation. The installer will copy the necessary files and set up Python on your system.
- Once the installation is complete, you can close the installer.
To verify that Python is installed correctly, follow these steps:
- Open a command prompt by pressing the Windows key + R, typing "cmd," and pressing Enter.
- In the command prompt, type the following command and press Enter: python --version You should see the Python version number displayed in the output, indicating that Python is installed and accessible from the command prompt.
Visual Studio Code is a popular IDE that provides excellent support for Python development. To set up Visual Studio Code, follow these steps:
- Open a web browser and visit the official Visual Studio Code website at https://code.visualstudio.com/.
- Click on the "Download" button to download the Visual Studio Code installer.
- Once the download is complete, locate the installer file and double-click on it to run the installer.
- Follow the on-screen instructions to install Visual Studio Code.
- Once the installation is complete, open Visual Studio Code.
To enable Python development in Visual Studio Code, we need to install the Python extension. Follow these steps:
- In Visual Studio Code, click on the "Extensions" icon on the left sidebar (or press Ctrl+Shift+X).
- In the search bar, type "Python" and press Enter.
- Look for the "Python" extension by Microsoft in the search results and click on the "Install" button next to it.
- Wait for the installation to complete, and then click on the "Reload" button to activate the extension.
In this activity, you learned how to install Python on Windows, set up Visual Studio Code as an IDE for Python development, and understood the benefits of using Python in a Windows environment. You are now ready to start coding in Python using Visual Studio Code! Explore the possibilities of Python and continue honing your programming skills. Happy coding!