Quiz 7: Nested Loops and Files
Learning Goals
Students should be able to:
-
Implement accumulation patterns requiring nested for loops in Python to translate accumulative algorithms from English
- Predict the effect of indexing nested list structures
- Write indexes for specific elements in nested list structures
-
Implement accumulation patterns requiring nested for loops in Python to translate accumulative algorithms from English
- Open files in different modes using Python's open() function
- Use Python's
with ... assyntax for opening and closing files. - Read data from files using readline() and readlines()
- Write data to files using write()
- Explain the difference between reading, writing, and appending files
- Understand how programs create and modify files
Study Guide
Blank (fill in your solutions)
Solutions
After your quiz is graded by instructors, you will get an email from Gradescope. Solutions for individual quiz questions are provided in the Gradescope rubric.