Lab 1: Programming Environment

Part 1: Python and VS Code Installation

In this first part of the lab, the goal is to get Python and an IDE (VS Code) installed on your computer. We suggest that you work in pairs with someone who has a laptop with the same operating system (Windows or Mac or Linux) as you do.

Installation instructions for Python and VS Code are provided in the Installing Python Lecture Notes. Please follow the instructions carefully as deviating from them can cause unexpected errors.

Confirm that your Python and VS Code install works with the following steps:

1. Type and execute the following lines from the Python interactive shell:

x = 4+3*2
print(x)
x = x % 3
print("result", x)
print(6/2)

2. Create a Python file named area.py using VS Code. Add the below lines into the file. Save and run the program using VS Code.

length = 5
width = 10
print("Rectangle with length of", length," and width of", width)
print("Area is", length * width)

Part 2:

Please read the submission instructions below before starting this section. In this second part of the lab, you will do the following:

Submission:

1. Upload the interview.py program to Blackboard.

2. Create a file named outputs.txt using Notepad on Windows, or outputs.rtf using TextEdit on the Mac. As you run each command in part 2, copy and paste the command and its output into the text file. Upload this file on Blackboard after you run all the commands.

Evaluation Rubric:

area.py: 2 points

outputs document: 3 points