Introduction: This document presents learning steps for Python 11. In Python 10, you have learned how to manipulate plain text files, i.e. files containing unstructured contents. But, often in software projects we face data values with a specific structure, like csv file. In Python 11, you will get introduced with files that contains more structured data values.
Note: In this phase, it is expected the learner can divide the program into smaller learning steps. The goal and direction of the topics will be provided. The student must take smaller steps towards the goals such that can implement solutions to the given problems and product(s).
The activities are designed based on these following references:
- BRef-01: Book, Bill Lubanovic; "Introducing Python: Modern Computing in Simple Packages"; Available here
- ORef-02: Online Tutorial; Lucas Lofaro; "Working With JSON Data in Python"; Available here
- ORef-03: Online Tutorial; Jon Fincher; "Reading and Writing CSV Files in Python"; Available here
After taking this step, you will be able to:
1. interpret and implement Python programs using structured data files: reading / writing content from / to CSV / JSON files, processing / modifying content of CSV / JSON files.
- Using BRef-01: Chapter 16, ORef-02 and ORef-03 answer and experiment the following questions:
- What is a csv file? How can one read the content of a csv file?
- What is a JSON file? How can one read the content of a JSON file?
- Given a csv file, how can we process the records? Experiment with an example where:
- a specific term is being searched
- the values of specific attributes for some records are extracted.
- the values of specific attributes for some records are modified.
- Given a JSON file, how can we process the objects? Experiment with an example where:
- the values of specific attributes for some objects are extracted.
- the values of specific attributes for some objects are modified.
- Design at least ten different exercises of your own. They should improve understanding topics of this step. Share your exercises with your learning group and practice.
[todo]
[todo]