Skip to content

Course home

Programming fundamentals

Programming fundamentals

EasyMediumHard
123456789101112131415161718192021222324
Question 10

An environmental monitoring system tracks the pH level of a local river. A program written in a high-level language is used to record these measurements. This program has a procedure, LogAcidityReading(), that saves a reading's details to an external text file.

The procedure LogAcidityReading():

  • takes a string containing the timestamped pH data as a parameter
  • takes the filename of the target text file as a parameter
  • writes the string containing the pH data to the specified text file.

Write the procedure LogAcidityReading() using either OCR Exam Reference Language or a high-level programming language that you have studied.

[4]
Markscheme

Programming fundamentals Questions

  1. GCSE
  2. /Computer Science
  3. /Programming fundamentals

95 exam-style questions on OCR GCSE Computer Science Programming fundamentals. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank