total starts at 0. A loop reads one integer per text-file line. Which update adds every line's number to the running total?
notes.txt exists. Which expression opens it for reading and returns a file object?
A text file contains '9\n7\n4\n'. f.readline() has consumed the first line. What does f.readlines() return now?
The script is in /projects/app, but its current working directory is /projects/run. It opens the relative path data.txt. Which directory supplies the path's starting point?
A writable file f remains open with output buffered. All operations succeed. Which action both flushes that output and releases the file resource?
With a comma delimiter and standard CSV quoting, which fields does csv.reader return for the record '"Maple, gold",14'?
line contains ' cedar\n'. The target is ' cedar', including its leading space. Which expression removes only the trailing newline for this comparison?
csv.DictReader returns row['year'] as the string '2031'. Which assignment reconstructs that field as the integer 2031?