Skip to Content
Python Intermediate: Write Code You Won't Be Embarrassed to Share
Intermediate
0 likes
Courses
Python Intermediate: Write Code You Won't Be Embarrassed to Share

Check Yourself: Work With Real Files

Five scenario questions on file handling, pathlib and CSV data. If you miss more than one, reread the lesson before moving on.

Course content

Sign in to save your progress.

Course Home
1. Your script writes the daily summary with open("summary.txt", "w") inside a loop over 30 stores. At the end, the file only has the last store. Why?
2. A CSV file shows "José" instead of "José" when your script reads it on a coworker's Windows laptop. What is the most likely fix?
4. An export has a customer named "Reyes, Ana" in quotes. Your script uses line.split(","), and every value after it is in the wrong column. What should you do?

About

Five scenario questions on file handling, pathlib and CSV data. If you miss more than one, reread the lesson before moving on.

Duration
5 min
Last update
09/18/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.