0% found this document useful (0 votes)
12 views6 pages

Setting Up VS Code and Google Colab

This document provides a step-by-step guide for setting up the Visual Studio Code environment and Google Colab for Python development. It includes instructions for installing Visual Studio Code, the Python extension, and a Python interpreter, as well as how to run a simple Hello World program. Additionally, it outlines the process for using Google Colab, including mounting a drive and running a Python file.

Uploaded by

Trong Nguyen Duc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Setting Up VS Code and Google Colab

This document provides a step-by-step guide for setting up the Visual Studio Code environment and Google Colab for Python development. It includes instructions for installing Visual Studio Code, the Python extension, and a Python interpreter, as well as how to run a simple Hello World program. Additionally, it outlines the process for using Google Colab, including mounting a drive and running a Python file.

Uploaded by

Trong Nguyen Duc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PFP – SET UP THE ENVIRONMENT

I.. Set up the Visual Studio Code environment:


1. Install the Visual Studio Code: [Link] (Click Download for Windows).

2. Install the Python extension for VS Code from the Visual Studio Marketplace. For additional
details on installing extensions, see Extension Marketplace. The Python extension is
named Python, and Microsoft publishes it.
([Link]

3. Install a Python interpreter. ([Link]


4. Verify the Python installation. (py -3 –version)

5. Start VS Code in a project (workspace) folder.


- Create by Explorer

- Create by command line

6. Select a Python interpreter.


- Click “View” -> “Command Pallete…” or press “Ctrl + Shift + P”

- Type Python: Select Interpreter


- Select command
7. Create a Python Hello World source code file.

8. Run Hello World.


There are three ways to run a python file in VSS:
- Right-click anywhere in the editor window and select Run Python File in Terminal (which
saves the file automatically)
- Select one or more lines, then press Shift+Enter or right-click and select Run
Selection/Line in Python Terminal. This command is convenient for testing just a part of a
file.
- From the Command Palette (Ctrl+Shift+P), select the Python: Start REPL command to
open a REPL terminal for the currently selected Python interpreter. In the REPL, you can
then enter and run lines of code one at a time.

Reference: [Link]

II. Set up the Google Colab:


1. Enter the Google Colab: [Link]

2. Mounting drive
- Click “Tool” -> “Command Pallette” or “Ctrl + Shift + P”
- Type “m” and select “Mount Drive”
- Click Run cell to mount the drive

3. Listing drive content

4. Create a [Link] file on your local disk.

5. Upload the file on the drive.


6. Run the [Link] file

You might also like