Starting from:
$35

$29

Assignment: 1. Python Tutorial Solved


 Goal
The goal of this assignment is to familiarize you with the Python programming language.

 What to do -- task.py
You are asked to implement parts 4, 5, 6 and 7 from the recitation handout. The program skeleton is already in place, you just need to implement the methods.


 def part4(self)
For this part, you must use `self.hours` we defined in part 3, and store its data as a CSV file (hours.csv), with the fields `name`, `day` and `time`. You should look up the `csv` module and the `writer()` function in particular. The command to open the csv file for writing is already in the template, so, don't change it.

 def part5(self)
For this part, you must open the CSV file created from part 4, read its contents, and write them in the file `part5.txt`.

 def part6(self)
For this part, you must open the CSV file again, but this time you must parse it using `csv.reader()`, and write only the rows, one row at a time, in the file `part6.txt`.

 def part7(self)
For this part, you must open the CSV file again, parse it using `csv.reader()`, iterate through the rows, and write every cell, one cell at a time, in the file `part7.txt`.


 Important notes about grading
It is absolutely imperative that your python program:  
* runs without any syntax or other errors (using Python 3)  
* strictly adheres to the format specifications for input and output, as explained above.     

Failure in any of the above will result in **severe** point loss.


 Allowed Python Libraries (Updated)
You are allowed to use the following Python libraries (although a fraction of these will actually be needed):
```
argparse
collections
csv
json
glob
math
os
pandas
re
requests
string
sys
time
xml
```
If you would like to use any other libraries, you must ask permission within a maximum of one week after the assignment was released, using [canvas](http://cs1656.org).


 How to submit your assignment
We are going to use Gradescope to submit and grade your assignments. 

To submit your assignment:
* login to Canvas for this class <https://cs1656.org>  
* click on Gradescope from the menu on the left  
* select "Recitation Lab 1" from the list of active assignments in Gradescope
* follow the instructions to submit your assignment and have it automatically graded.

 

More products