Grade 9 · unit review

Review: Read Text Files and Structured Formats

Interpret CSV A,"red,blue",5 and JSON {"id":"007","count":5}. Plan a read-only source inspection and a separate derived output.

Bring the unit skills together

Use these 4 new cases to check your reasoning. Choices are temporary and are not saved to an account, sent to staff or recorded as school grades. Download your current review choices before leaving or reloading.

Unit review questions
1. Paper Python 3 expression: " 007 ".strip(). What value results?
Need a hint?
  • Remove surrounding whitespace and preserve characters inside the stated text.
  • Do not collapse an internal space just because surrounding whitespace is trimmed.
2. Request the count field. CSV row: A,"red,blue",5. Which parsed field is requested?
Need a hint?
  • Keep commas inside paired quotation marks as part of one field.
  • A comma inside a quoted field is not a new column boundary.
3. The unquoted 5 quantity. Object: {"id":"007","count":5,"done":true,"tags":["red","blue"]}. Which value type is requested?
Need a hint?
  • Read the exact key and distinguish its stated value type.
  • Valid JSON syntax is different from a valid application record.
4. Need a retained source and new summary file. Which stated plan fits the purpose?
Need a hint?
  • Use read mode for inspection and a separate destination when the original must remain.
  • Opening a destination for writing can replace existing content; do not treat it as harmless inspection.

The download contains your current choices and any checked feedback. Keep the separate transfer-task work in your own document; downloading its instructions does not mark it complete.

Use the skills in a new task

Interpret CSV A,"red,blue",5 and JSON {"id":"007","count":5}. Plan a read-only source inspection and a separate derived output.

Work on paper or in your own document. Explain the choices you made.

  • Use only supplied fictional inputs and state the relevant rule.
  • Include labeled steps or evidence for each decision.
  • Name one limitation or tempting mistake.
  • Check that the result meets the task and revise a justified error.
Compare with a model response

The CSV A,"red,blue",5 has three fields: "A", "red,blue", and "5". The comma inside the quoted second field is content, not a separator. In JSON {"id":"007","count":5}, id is text "007" and count is numeric 5. Read the retained source without writing to it; validate inputs and write a distinct derived output.

A different response can also meet the criteria. Compare the evidence and reasoning, rather than copying the wording.