This is the solution to Quiz 7: Problems - Python - I/O, error handling, and tesing frameworks.
The following figure illustrates the grade distribution for this quiz.
This quiz aims at testing your basic knowledge of Python’s I/O.
1. Consider this comma-separated data file. Write a simple Python code
outputter.py that takes two command line arguments like the following,
python outputter.py outputter.in outputter.out
and then writes the same float data in the output file
outputter.out (whose name and path was taken from the command-line), and writes out data in a formatted style, like this example output file, with only three digits after decimal point.
Here is an example attempt.