Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Python Intro CS EN

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

14BHDxx – Computer Sciences – Academic Year 2023/24

Software Installation
(Windows platform)
Summary
Video with installation instructions ................................................................................................................... 2
Installing the Python interpreter ....................................................................................................................... 3
Installing the Visual Studio Code Development Environment........................................................................... 5
Python interpreters online ................................................................................................................................ 8

This short document indicates the basic steps to install the software used in the
Computer Science course: the Python language interpreter, and the Visual Studio Code
development environment.

The following instructions are for installing on Windows operating systems.


14BHDxx Informatics 2023/24 Computer Sciences Software Installation

Video with installation instructions


For those who are allergic to the written text, here we share an explanatory video about the different steps
to succeed on the installation process.

Link to video https://www.youtube.com/watch?v=cUAK4x_7thA

2
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

Installing the Python interpreter

1. Navigate to the site https://www.python.org 2. Select Downloads and then the version of
Python suitable for your operating system.
Note: We recommend that you install the latest version
(currently 3.11.x). In the case of PCs with Windows 7, you can
only install version 3.8.

3. Download and save the installer 4. Start the installer


5. Check the box "Add python.exe to PATH" (makes
it easier to boot Python from 'Command Prompt'
windows)
6. Select "Install Now" to start the installation

7. Wait for the installation process to complete 8. Select the "Disable path length limit" option, if it
is proposed.
9. Close the installer

3
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

10. Python-related entries have appeared in the 11. Enable "Command Prompt" from Windows
Windows Start Menu applications
12. Inside the "Command Prompt" window, type
the python command and verify that the startup
message appears. This is the interactive Python
interpreter.
13. To exit the interpreter type Ctrl-Z and Enter

4
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

Installing the Visual Studio Code Development Environment


The environment in which we will write and execute Python programs (IDE – Integrated Development
Environment)

1. Navigating the site 2. Download VS Code


https://code.visualstudio.com/ 3. When the download is complete, launch the
installer

5
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

4. Follow the steps proposed by the installation


program (all the values proposed by the wizard are
fine)
When finished, start Visual Studio Code

5. When you first start it, you need to select some 6. After the initial settings, you will find yourself on
settings (such as light/dark theme) the main page (empty, because we have not yet
opened any project)

6
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

7. Select "New File" and enter a file name (e.g. 8. VS Code understands (from the .py extension)
prova.py). It is important that the file extension is that we want to program in Python, and suggests
.py (bottom right) to install Python Project Editing
Save the file to a folder of your choice. Extensions.
Install the extension that is being proposed.
Warning: this automatism occurs only the first time, otherwise
you have to manually install the Python extension.

9. Proceed with the installation of the Python 10. Write a small Python program, for example:
extension, and wait for the installation to finish. print("Hello, world")

11. By pressing the "Run" button (upper right


triangle), the program is executed.
At the bottom will appear the output of the program
(Hello, world), or any error messages.

7
14BHDxx Informatics 2023/24 Computer Sciences Software Installation

Python interpreters online


There are several websites where you can write and run Python programs directly from your browser,
without installing programs on your PC. They are very useful tools both to do tests "on the fly", and to
share programs with teachers or other students.

But remember to save/export/download your work on your PC.

• Replit.com (https://replit.com/) is a collaborative environment where you can write, test, and share
your code (in Python and other languages). It is recommended to create an account, also for the
ease of sharing your work.
• Python Tutor (https://pythontutor.com/) is not a real programming environment, but allows you to
execute a few lines of code, displaying in a graphical and interactive way the variables and values
stored in the program. Fundamental to understanding how variables work in Python.

You might also like