Question: Start the lab You'll need to start the lab before you can access the materials. To do this, click the green Start Lab button at

Start the lab
You'll need to start the lab before you can access the materials. To do this, click the green Start Lab button at the top of the screen.
Green "Start Lab" button
After you click the Start Lab button, you will see a shell, where you will be performing further steps in the lab. You should have a shell like this:
Screenshot of shell terminal CLI. CLI reads "student@864a6934570a: -$"
Prerequisites
We have created the employee list for you. Navigate to the data directory using the following command:
cd data
Copied!
To find the data, list the files using the following command:
ls
Copied!
You can now see a file called employees.csv, where you will find your data. You can also see a directory called scripts. We will write the python script in this directory.
To view the contents of the file, enter the following command:
cat employees.csv
Copied!
Let's start by writing the script. You will write this python script in the scripts directory. Go to the scripts directory by using the following command:
cd ~/scripts
Copied!
Create a file named generate_report.py using the following command:
nano generate_report.py
Copied!
You will write your python script in this generate_report.py file. This script begins with a line containing the #! character combination, which is commonly called hash bang or shebang, and continues with the path to the interpreter. If the kernel finds that the first two bytes are #! then it uses the rest of the line as an interpreter and passes the file as an argument. We will use the following shebang in this script:
#!/usr/bin/env python3
Copied!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!