{
  "schema": "cie-topical-past-papers/v1",
  "subject": "9618",
  "subject_name": "Computer Science",
  "syllabus_url": "https://www.cambridgeinternational.org/Images/697372-2026-syllabus.pdf",
  "generated": "2026-08-14",
  "coverage": {
    "years": [
      2021,
      2022,
      2023,
      2024,
      2025,
      2026
    ],
    "sessions": [
      "May/June",
      "Oct/Nov"
    ],
    "papers": [
      "31",
      "32",
      "33",
      "41",
      "42",
      "43"
    ],
    "available_papers": 58,
    "missing_papers": [
      {
        "year": 2021,
        "session": "Oct/Nov",
        "variant": "33",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_33.pdf?download=true",
        "reason": "not available from the local downloader/source search"
      },
      {
        "year": 2021,
        "session": "Oct/Nov",
        "variant": "43",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_43.pdf?download=true",
        "reason": "not available from the local downloader/source search"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "31",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_31.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "32",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_32.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "33",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_33.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "41",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_41.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "42",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_42.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "May/June",
        "variant": "43",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-May-June/9618_s26_qp_43.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "31",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_31.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "32",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_32.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "33",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_33.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "41",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_41.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "42",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_42.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      },
      {
        "year": 2026,
        "session": "Oct/Nov",
        "variant": "43",
        "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2026-Oct-Nov/9618_w26_qp_43.pdf?download=true",
        "reason": "unpublished as of 2026-08-14"
      }
    ]
  },
  "topics": [
    {
      "number": 13,
      "label": "Data representation",
      "slug": "9618-topic-13-data-representation",
      "questions_html": "9618-topic-13-data-representation/questions.html",
      "answers_html": "9618-topic-13-data-representation/answers.html"
    },
    {
      "number": 14,
      "label": "Communication and internet technologies",
      "slug": "9618-topic-14-communication-and-internet-technologies",
      "questions_html": "9618-topic-14-communication-and-internet-technologies/questions.html",
      "answers_html": "9618-topic-14-communication-and-internet-technologies/answers.html"
    },
    {
      "number": 15,
      "label": "Hardware and virtual machines",
      "slug": "9618-topic-15-hardware-and-virtual-machines",
      "questions_html": "9618-topic-15-hardware-and-virtual-machines/questions.html",
      "answers_html": "9618-topic-15-hardware-and-virtual-machines/answers.html"
    },
    {
      "number": 16,
      "label": "System software",
      "slug": "9618-topic-16-system-software",
      "questions_html": "9618-topic-16-system-software/questions.html",
      "answers_html": "9618-topic-16-system-software/answers.html"
    },
    {
      "number": 17,
      "label": "Security",
      "slug": "9618-topic-17-security",
      "questions_html": "9618-topic-17-security/questions.html",
      "answers_html": "9618-topic-17-security/answers.html"
    },
    {
      "number": 18,
      "label": "Artificial intelligence (AI)",
      "slug": "9618-topic-18-artificial-intelligence",
      "questions_html": "9618-topic-18-artificial-intelligence/questions.html",
      "answers_html": "9618-topic-18-artificial-intelligence/answers.html"
    },
    {
      "number": 19,
      "label": "Computational thinking and problem-solving",
      "slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "questions_html": "9618-topic-19-computational-thinking-and-problem-solving/questions.html",
      "answers_html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html"
    },
    {
      "number": 20,
      "label": "Further programming",
      "slug": "9618-topic-20-further-programming",
      "questions_html": "9618-topic-20-further-programming/questions.html",
      "answers_html": "9618-topic-20-further-programming/answers.html"
    },
    {
      "number": null,
      "label": "Practical programming",
      "slug": "9618-practical-programming",
      "questions_html": "9618-practical-programming/questions.html",
      "answers_html": "9618-practical-programming/answers.html"
    }
  ],
  "papers": [
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "31",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf"
    },
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "32",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf"
    },
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "33",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf"
    },
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_41.pdf"
    },
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_42.pdf"
    },
    {
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2021-may-june/qp/9618_s21_qp_43.pdf"
    },
    {
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "31",
      "paper": 3,
      "question_count": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf"
    },
    {
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "32",
      "paper": 3,
      "question_count": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf"
    },
    {
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_41.pdf"
    },
    {
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_42.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "31",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "32",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "33",
      "paper": 3,
      "question_count": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_41.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_42.pdf"
    },
    {
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2022-may-june/qp/9618_s22_qp_43.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "31",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "32",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "33",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_41.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_42.pdf"
    },
    {
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_43.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "31",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "32",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "33",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_41.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_42.pdf"
    },
    {
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2023-may-june/qp/9618_s23_qp_43.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "31",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "32",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "33",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_41.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_42.pdf"
    },
    {
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_43.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "31",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "32",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "33",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_41.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_42.pdf"
    },
    {
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2024-may-june/qp/9618_s24_qp_43.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "31",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "32",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "33",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_41.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_42.pdf"
    },
    {
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_43.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "31",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "32",
      "paper": 3,
      "question_count": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "33",
      "paper": 3,
      "question_count": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_41.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_42.pdf"
    },
    {
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2025-may-june/qp/9618_s25_qp_43.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "31",
      "paper": 3,
      "question_count": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "32",
      "paper": 3,
      "question_count": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "33",
      "paper": 3,
      "question_count": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "41",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_41.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_41.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "42",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_42.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_42.pdf"
    },
    {
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "variant": "43",
      "paper": 4,
      "question_count": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_43.pdf?download=true",
      "local_path": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_43.pdf"
    }
  ],
  "records": [
    {
      "id": "9618-2021-mj-31-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 14,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2021-mj-31-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2021-mj-31-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 14
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• Two’s complement form for both the mantissa and the exponent.\nCalculate the normalised floating-point representation of –7.25 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nCalculate the denary value of the given binary floating-point number. (b)\nShow your working.\nMantissa Exponent\n1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\n© UCLES 2021 9618/31/M/J/21\n3\nThe given binary floating-point number is not normalised. (c)\nNormalise the floating-point number. Show your working.\nMantissa Exponent\n0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1\nMantissa Exponent\nWorking .....................................................................................................................................\n.............................................................................................................."
    },
    {
      "id": "9618-2021-mj-31-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 8
      },
      "text_excerpt": "Describe the purpose of a user-defined data type. 2 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDefine, using pseudocode, the following enumerated data types: (b)\nto hold data about the days students are usually in school. (i)\nSchoolDay\n...........................................................................................................................................\n..................................................................................................................................... [1]\nto hold data about the days that are not school days. (ii)\nWeekEnd\n...........................................................................................................................................\n..................................................................................................................................... [1]\nDefine, using pseudocode, the composite data type . This will hold data about club (c)\nClubMeet\nmembers that includes:\n• first name and last name\n• the two days they attend:\n○ one on a school day\n○ one not on a school day.\nUse the enumerated types you created in (b). part\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n....................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-31-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q03",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 9
      },
      "text_excerpt": "Draw line to connect each term to the 3 (a) one Operating System (OS) most appropriate\ndescription about it.\nOS term Description\nUsing secondary storage to simulate\nadditional main memory\nMulti-tasking\nManaging the processes running on\nthe CPU\nPaging\nManaging the execution of many programs\nthat appear to run at the same time\nInterrupt handling\nLocating non-contiguous blocks of data and\nrelocating them\nScheduling\nTransferring control to another routine when\na service is required\nVirtual memory\nReading/writing same-size blocks of data\nfrom/to secondary storage when required\n[5]\nExplain how an interpreter executes a program without producing a complete translated (b)\nversion of it.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2021 9618/31/M/J/21"
    },
    {
      "id": "9618-2021-mj-31-q04",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Explain why Reverse Polish Notation (RPN) is used to carry out the evaluation of 4 (a) (i)\nexpressions.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nIdentify, with reasons, a data structure that could be used to evaluate an expression (ii)\nin RPN.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nWrite the infix expression in RPN. (b)\n(a – b) * (a + c) / 7\n...................................................................................................................................................\n............................................................................................................................................. [1]\nWrite the RPN expression as an infix expression. (c)\na b / 4 * a b + -\n...................................................................................................................................................\n............................................................................................................................................. [1]\nEvaluate the RPN expression: (d)\na b + c d / /\nwhere .\na = 17, b = 3, c = 48 and d = 12\nShow your working.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2021 9618/31/M/J/21"
    },
    {
      "id": "9618-2021-mj-31-q05",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-31-q05-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-31-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q05",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 8
      },
      "text_excerpt": "Calculate the shortest distance between the base and each of the other towns in the diagram 5 (a)\nusing Dijkstra’s algorithm.\nShow your working write your answers in the table provided. and\nBase\n4\n5\nTown 1 2\nTown 2\n1\n8\nTown 3\n7 3 Town 6\n1\n5\n6\nTown 5 Town 4\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswers\nTown 1 Town 2 Town 3 Town 4 Town 5 Town 6\n[5]\n[Turn over © UCLES 2021 9618/31/M/J/21\n8\nExplain the use of graphs to aid Artificial Intelligence (AI). (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]"
    },
    {
      "id": "9618-2021-mj-31-q06",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2021-mj-31-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q06",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "Give benefits drawbacks of packet switching. 6 two and two\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\nDrawback 1 ......................................................................................................................................\n..........................................................................................................................................................\nDrawback 2 ......................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2021 9618/31/M/J/21"
    },
    {
      "id": "9618-2021-mj-31-q07",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-mj-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 8
      },
      "text_excerpt": "The diagram shows a logic circuit. 7\nA P\nY\nB\nR C\nZ\nQ\nComplete the truth table for the given logic circuit. Show your working. (a)\nInputs Working space Outputs\nA B C P Q R Y Z\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[3]\nState the name of the logic circuit. (b)\n............................................................................................................................................. [1]\nWrite the Boolean expressions for the two outputs and in the truth table as (c) Y Z\nsum-of-products state the purpose of each output. and\n= ............................................................................................................................................ Y\nPurpose ....................................................................................................................................\n= ............................................................................................................................................ Z\nPurpose ....................................................................................................................................\n[4]\n[Turn over © UCLES 2021 9618/31/M/J/21"
    },
    {
      "id": "9618-2021-mj-31-q08",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-31-q08-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-31-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "State factors that may affect the performance of a sorting algorithm. 8 (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe given algorithm is a simple bubble sort that arranges a set of scores stored in a one- (b)\ndimensional array into order, and orders the corresponding students’ names descending\nstored into a two-dimensional array in the same order as the scores. All the arrays are indexed\nfrom 1.\nThe contents of both arrays after sorting are shown.\nName\nScore\n1 2\n98 Smithfield Tom 1 1\n97 Johnson Jane 2 2\n… …\n5 Peters Jade 248 248\n3 Allen John 249 249\n←\n249 YearSize\n←\nTRUE Flag\nWHILE Flag = TRUE\n←\nFALSE Flag\n←\n1 TO YearSize - 1 FOR Student\nIF Score[Student] < Score[Student + 1] THEN\n←\nScore[Student] Temp1\n←\nName[Student,1] Temp2\n←\nName[Student,2] Temp3\n←\nScore[Student + 1] Score[Student]\n←\nName[Student + 1,1] Name[Student,1]\n←\nName[Student + 1,2] Name[Student,2]\n←\nTemp1 Score[Student + 1]\n←\nTemp2 Name[Student + 1,1]\n←\nTemp3 Name[Student + 1,2]\n←\nTRUE Flag\nENDIF\nNEXT Student\nENDWHILE\n© UCLES 2021 9618/31/M/J/21\n11\nWrite an algorithm, using pseudocode, that will perform the same task using an insertion sort.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n.........................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-31-q09",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_31.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-31-q09",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 8
      },
      "text_excerpt": "Describe what is meant by programming language. 9 (a) an imperative (procedural)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDescribe what is meant by programming language. (b) a declarative\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nIdentify the programming paradigm for each of these program code examples. (c)\nProgram code example Programming paradigm\nmale(john).\nfemale(ethel).\nparent(john, ethel).\nFOR Counter = 1 TO 20\nX = X * Counter\nNEXT Counter\nStart: LDD Counter\nINC ACC\nSTO Counter\npublic class Vehicle\n{\nprivate speed;\npublic Vehicle()\n{\nspeed = 0;\n}\n}\n[4]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of\nCambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.\n© UCLES 2021 9618/31/M/J/21"
    },
    {
      "id": "9618-2021-mj-32-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 14,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2021-mj-32-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2021-mj-32-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 14
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• Two’s complement form for both the mantissa and the exponent.\nCalculate the normalised floating-point representation of –7.25 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nCalculate the denary value of the given binary floating-point number. (b)\nShow your working.\nMantissa Exponent\n1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\n© UCLES 2021 9618/32/M/J/21\n3\nThe given binary floating-point number is not normalised. (c)\nNormalise the floating-point number. Show your working.\nMantissa Exponent\n0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1\nMantissa Exponent\nWorking .....................................................................................................................................\n.............................................................................................................."
    },
    {
      "id": "9618-2021-mj-32-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 8
      },
      "text_excerpt": "Describe the purpose of a user-defined data type. 2 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDefine, using pseudocode, the following enumerated data types: (b)\nto hold data about the days students are usually in school. (i)\nSchoolDay\n...........................................................................................................................................\n..................................................................................................................................... [1]\nto hold data about the days that are not school days. (ii)\nWeekEnd\n...........................................................................................................................................\n..................................................................................................................................... [1]\nDefine, using pseudocode, the composite data type . This will hold data about club (c)\nClubMeet\nmembers that includes:\n• first name and last name\n• the two days they attend:\n○ one on a school day\n○ one not on a school day.\nUse the enumerated types you created in (b). part\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n....................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-32-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q03",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 9
      },
      "text_excerpt": "Draw line to connect each term to the 3 (a) one Operating System (OS) most appropriate\ndescription about it.\nOS term Description\nUsing secondary storage to simulate\nadditional main memory\nMulti-tasking\nManaging the processes running on\nthe CPU\nPaging\nManaging the execution of many programs\nthat appear to run at the same time\nInterrupt handling\nLocating non-contiguous blocks of data and\nrelocating them\nScheduling\nTransferring control to another routine when\na service is required\nVirtual memory\nReading/writing same-size blocks of data\nfrom/to secondary storage when required\n[5]\nExplain how an interpreter executes a program without producing a complete translated (b)\nversion of it.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2021 9618/32/M/J/21"
    },
    {
      "id": "9618-2021-mj-32-q04",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Explain why Reverse Polish Notation (RPN) is used to carry out the evaluation of 4 (a) (i)\nexpressions.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nIdentify, with reasons, a data structure that could be used to evaluate an expression (ii)\nin RPN.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nWrite the infix expression in RPN. (b)\n(a – b) * (a + c) / 7\n...................................................................................................................................................\n............................................................................................................................................. [1]\nWrite the RPN expression as an infix expression. (c)\na b / 4 * a b + -\n...................................................................................................................................................\n............................................................................................................................................. [1]\nEvaluate the RPN expression: (d)\na b + c d / /\nwhere .\na = 17, b = 3, c = 48 and d = 12\nShow your working.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2021 9618/32/M/J/21"
    },
    {
      "id": "9618-2021-mj-32-q05",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-32-q05-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-32-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q05",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 8
      },
      "text_excerpt": "Calculate the shortest distance between the base and each of the other towns in the diagram 5 (a)\nusing Dijkstra’s algorithm.\nShow your working write your answers in the table provided. and\nBase\n4\n5\nTown 1 2\nTown 2\n1\n8\nTown 3\n7 3 Town 6\n1\n5\n6\nTown 5 Town 4\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswers\nTown 1 Town 2 Town 3 Town 4 Town 5 Town 6\n[5]\n[Turn over © UCLES 2021 9618/32/M/J/21\n8\nExplain the use of graphs to aid Artificial Intelligence (AI). (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]"
    },
    {
      "id": "9618-2021-mj-32-q06",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2021-mj-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q06",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "Give benefits drawbacks of packet switching. 6 two and two\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\nDrawback 1 ......................................................................................................................................\n..........................................................................................................................................................\nDrawback 2 ......................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2021 9618/32/M/J/21"
    },
    {
      "id": "9618-2021-mj-32-q07",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-mj-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 8
      },
      "text_excerpt": "The diagram shows a logic circuit. 7\nA P\nY\nB\nR C\nZ\nQ\nComplete the truth table for the given logic circuit. Show your working. (a)\nInputs Working space Outputs\nA B C P Q R Y Z\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[3]\nState the name of the logic circuit. (b)\n............................................................................................................................................. [1]\nWrite the Boolean expressions for the two outputs and in the truth table as (c) Y Z\nsum-of-products state the purpose of each output. and\n= ............................................................................................................................................ Y\nPurpose ....................................................................................................................................\n= ............................................................................................................................................ Z\nPurpose ....................................................................................................................................\n[4]\n[Turn over © UCLES 2021 9618/32/M/J/21"
    },
    {
      "id": "9618-2021-mj-32-q08",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-32-q08-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-32-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "State factors that may affect the performance of a sorting algorithm. 8 (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe given algorithm is a simple bubble sort that arranges a set of scores stored in a one- (b)\ndimensional array into order, and orders the corresponding students’ names descending\nstored into a two-dimensional array in the same order as the scores. All the arrays are indexed\nfrom 1.\nThe contents of both arrays after sorting are shown.\nName\nScore\n1 2\n98 Smithfield Tom 1 1\n97 Johnson Jane 2 2\n… …\n5 Peters Jade 248 248\n3 Allen John 249 249\n←\n249 YearSize\n←\nTRUE Flag\nWHILE Flag = TRUE\n←\nFALSE Flag\n←\n1 TO YearSize - 1 FOR Student\nIF Score[Student] < Score[Student + 1] THEN\n←\nScore[Student] Temp1\n←\nName[Student,1] Temp2\n←\nName[Student,2] Temp3\n←\nScore[Student + 1] Score[Student]\n←\nName[Student + 1,1] Name[Student,1]\n←\nName[Student + 1,2] Name[Student,2]\n←\nTemp1 Score[Student + 1]\n←\nTemp2 Name[Student + 1,1]\n←\nTemp3 Name[Student + 1,2]\n←\nTRUE Flag\nENDIF\nNEXT Student\nENDWHILE\n© UCLES 2021 9618/32/M/J/21\n11\nWrite an algorithm, using pseudocode, that will perform the same task using an insertion sort.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n.........................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-32-q09",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_32.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-32-q09",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_32.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 8
      },
      "text_excerpt": "Describe what is meant by programming language. 9 (a) an imperative (procedural)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDescribe what is meant by programming language. (b) a declarative\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nIdentify the programming paradigm for each of these program code examples. (c)\nProgram code example Programming paradigm\nmale(john).\nfemale(ethel).\nparent(john, ethel).\nFOR Counter = 1 TO 20\nX = X * Counter\nNEXT Counter\nStart: LDD Counter\nINC ACC\nSTO Counter\npublic class Vehicle\n{\nprivate speed;\npublic Vehicle()\n{\nspeed = 0;\n}\n}\n[4]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of\nCambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.\n© UCLES 2021 9618/32/M/J/21"
    },
    {
      "id": "9618-2021-mj-33-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 14,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2021-mj-33-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2021-mj-33-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 14
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• Two’s complement form for both the mantissa and the exponent.\nCalculate the normalised floating-point representation of –7.25 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nCalculate the denary value of the given binary floating-point number. (b)\nShow your working.\nMantissa Exponent\n1 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\n© UCLES 2021 9618/33/M/J/21\n3\nThe given binary floating-point number is not normalised. (c)\nNormalise the floating-point number. Show your working.\nMantissa Exponent\n0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1\nMantissa Exponent\nWorking .....................................................................................................................................\n.............................................................................................................."
    },
    {
      "id": "9618-2021-mj-33-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 8
      },
      "text_excerpt": "Describe the purpose of a user-defined data type. 2 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDefine, using pseudocode, the following enumerated data types: (b)\nto hold data about the days students are usually in school. (i)\nSchoolDay\n...........................................................................................................................................\n..................................................................................................................................... [1]\nto hold data about the days that are not school days. (ii)\nWeekEnd\n...........................................................................................................................................\n..................................................................................................................................... [1]\nDefine, using pseudocode, the composite data type . This will hold data about club (c)\nClubMeet\nmembers that includes:\n• first name and last name\n• the two days they attend:\n○ one on a school day\n○ one not on a school day.\nUse the enumerated types you created in (b). part\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n....................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-33-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q03",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 9
      },
      "text_excerpt": "Draw line to connect each term to the 3 (a) one Operating System (OS) most appropriate\ndescription about it.\nOS term Description\nUsing secondary storage to simulate\nadditional main memory\nMulti-tasking\nManaging the processes running on\nthe CPU\nPaging\nManaging the execution of many programs\nthat appear to run at the same time\nInterrupt handling\nLocating non-contiguous blocks of data and\nrelocating them\nScheduling\nTransferring control to another routine when\na service is required\nVirtual memory\nReading/writing same-size blocks of data\nfrom/to secondary storage when required\n[5]\nExplain how an interpreter executes a program without producing a complete translated (b)\nversion of it.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2021 9618/33/M/J/21"
    },
    {
      "id": "9618-2021-mj-33-q04",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-mj-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Explain why Reverse Polish Notation (RPN) is used to carry out the evaluation of 4 (a) (i)\nexpressions.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nIdentify, with reasons, a data structure that could be used to evaluate an expression (ii)\nin RPN.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nWrite the infix expression in RPN. (b)\n(a – b) * (a + c) / 7\n...................................................................................................................................................\n............................................................................................................................................. [1]\nWrite the RPN expression as an infix expression. (c)\na b / 4 * a b + -\n...................................................................................................................................................\n............................................................................................................................................. [1]\nEvaluate the RPN expression: (d)\na b + c d / /\nwhere .\na = 17, b = 3, c = 48 and d = 12\nShow your working.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2021 9618/33/M/J/21"
    },
    {
      "id": "9618-2021-mj-33-q05",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-33-q05-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2021-mj-33-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q05",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 8
      },
      "text_excerpt": "Calculate the shortest distance between the base and each of the other towns in the diagram 5 (a)\nusing Dijkstra’s algorithm.\nShow your working write your answers in the table provided. and\nBase\n4\n5\nTown 1 2\nTown 2\n1\n8\nTown 3\n7 3 Town 6\n1\n5\n6\nTown 5 Town 4\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswers\nTown 1 Town 2 Town 3 Town 4 Town 5 Town 6\n[5]\n[Turn over © UCLES 2021 9618/33/M/J/21\n8\nExplain the use of graphs to aid Artificial Intelligence (AI). (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]"
    },
    {
      "id": "9618-2021-mj-33-q06",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2021-mj-33-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q06",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "Give benefits drawbacks of packet switching. 6 two and two\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\nDrawback 1 ......................................................................................................................................\n..........................................................................................................................................................\nDrawback 2 ......................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2021 9618/33/M/J/21"
    },
    {
      "id": "9618-2021-mj-33-q07",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-mj-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 8
      },
      "text_excerpt": "The diagram shows a logic circuit. 7\nA P\nY\nB\nR C\nZ\nQ\nComplete the truth table for the given logic circuit. Show your working. (a)\nInputs Working space Outputs\nA B C P Q R Y Z\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[3]\nState the name of the logic circuit. (b)\n............................................................................................................................................. [1]\nWrite the Boolean expressions for the two outputs and in the truth table as (c) Y Z\nsum-of-products state the purpose of each output. and\n= ............................................................................................................................................ Y\nPurpose ....................................................................................................................................\n= ............................................................................................................................................ Z\nPurpose ....................................................................................................................................\n[4]\n[Turn over © UCLES 2021 9618/33/M/J/21"
    },
    {
      "id": "9618-2021-mj-33-q08",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-33-q08-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-mj-33-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "State factors that may affect the performance of a sorting algorithm. 8 (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe given algorithm is a simple bubble sort that arranges a set of scores stored in a one- (b)\ndimensional array into order, and orders the corresponding students’ names descending\nstored into a two-dimensional array in the same order as the scores. All the arrays are indexed\nfrom 1.\nThe contents of both arrays after sorting are shown.\nName\nScore\n1 2\n98 Smithfield Tom 1 1\n97 Johnson Jane 2 2\n… …\n5 Peters Jade 248 248\n3 Allen John 249 249\n←\n249 YearSize\n←\nTRUE Flag\nWHILE Flag = TRUE\n←\nFALSE Flag\n←\n1 TO YearSize - 1 FOR Student\nIF Score[Student] < Score[Student + 1] THEN\n←\nScore[Student] Temp1\n←\nName[Student,1] Temp2\n←\nName[Student,2] Temp3\n←\nScore[Student + 1] Score[Student]\n←\nName[Student + 1,1] Name[Student,1]\n←\nName[Student + 1,2] Name[Student,2]\n←\nTemp1 Score[Student + 1]\n←\nTemp2 Name[Student + 1,1]\n←\nTemp3 Name[Student + 1,2]\n←\nTRUE Flag\nENDIF\nNEXT Student\nENDWHILE\n© UCLES 2021 9618/33/M/J/21\n11\nWrite an algorithm, using pseudocode, that will perform the same task using an insertion sort.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n.........................................................................................................................................."
    },
    {
      "id": "9618-2021-mj-33-q09",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_33.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-mj-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-33-q09",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 8
      },
      "text_excerpt": "Describe what is meant by programming language. 9 (a) an imperative (procedural)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDescribe what is meant by programming language. (b) a declarative\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nIdentify the programming paradigm for each of these program code examples. (c)\nProgram code example Programming paradigm\nmale(john).\nfemale(ethel).\nparent(john, ethel).\nFOR Counter = 1 TO 20\nX = X * Counter\nNEXT Counter\nStart: LDD Counter\nINC ACC\nSTO Counter\npublic class Vehicle\n{\nprivate speed;\npublic Vehicle()\n{\nspeed = 0;\n}\n}\n[4]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of\nCambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge.\n© UCLES 2021 9618/33/M/J/21"
    },
    {
      "id": "9618-2021-mj-41-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 24,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q01-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q01-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 24
      },
      "text_excerpt": "An unordered linked list uses a 1D array to store the data. 1\nEach item in the linked list is of a record type, , with a field and a field .\nnode data nextNode\nThe current contents of the linked list are:\nIndex 0 startPointer data nextNode\n0 1 1\n5 1 5 4 emptyList\n2 6 7\n3 7 -1\n4 2 2\n5 0 6\n6 0 8\n7 56 3\n8 0 9\n9 0 -1\nThe following is pseudocode for the record type . (a)\nnode\nTYPE node\nDECLARE data : INTEGER\nDECLARE nextNode : INTEGER\nENDTYPE\nWrite program code to declare the record type .\nnode\nSave your program as question1.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\n© UCLES 2021 9618/41/M/J/21\n3\nWrite program code for the main program. (b)\nDeclare a 1D array of type with the identifier , and initialise it with the data\nnode linkedList\nshown in the table on page 2. Declare the pointers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[4]\nThe procedure takes the array and as parameters. The (c)\noutputNodes() startPointer\nprocedure outputs the data from the linked list by following the values.\nnextNode\nWrite program code for the procedure . (i)\noutputNodes()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)(i)\n[6]\nEdit the main program to call the procedure . (ii)\noutputNodes()\nTake a screenshot to show the output of the procedure .\noutputNodes()\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(c)(ii)\n[1]\n[Turn over © UCLES 2021 9618/41/M/J/21\n4\nThe function, , takes the linked list and pointers as parameters, then takes as (d)\naddNode()\ninput the data to be added to the end of the .\nlinkedList\nThe function adds the node in the next available space, updates the pointers and returns\n. If there are no empty nodes, it returns .\nTrue False\nWrite program code for the function . (i)\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[7]\nEdit the main program to: (ii)\n• call\naddNode()\n• output an appropriate message depending on the result returned from\naddNode()\n• call twice; once before calling and once after calling\noutputNodes() addNode()\n.\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(ii)\n[3]\nTest your program by inputting the data value and take a screenshot to show the (iii)\n5\noutput.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(iii)\n[1]\n© UCLES 2021 9618/41/M/J/21\n5\nBLANK PAGE\n[Turn over © UCLES 2021 9618/41/M/J/21"
    },
    {
      "id": "9618-2021-mj-41-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_41.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_41.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20
        ],
        "marks": 20
      },
      "text_excerpt": "A program stores the following ten integers in a 1D array with the identifier . 2\narrayData\n10 5 6 7 1 12 13 15 21 8\nWrite program code for a to: (a) new program\n• declare the global 1D array, , with ten elements\narrayData\n• initialise in the main program using the data values shown.\narrayData\nSave your program as question2.\nCopy and paste the program code into in the evidence document. part 2(a)\n[2]\nA function, , takes an integer as a parameter and performs a linear (b) (i)\nlinearSearch()\nsearch on to find the parameter value. It returns if it was found and\narrayData True\nif it was not found.\nFalse\nWrite program code for the function .\nlinearSearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[6]\nEdit the main program to: (ii)\n• allow the user to input an integer value\n• pass the value to as the parameter\nlinearSearch()\n• output an appropriate message to tell the user whether the search value was found\nor not.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[4]\nTest your program with one value that is in the array and one value that is not in the (iii)\narray.\nTake a screenshot to show the result of each test.\nSave your program.\nCopy and paste the screenshots into in the evidence document. part 2(b)(iii)\n[2]\n© UCLES 2021 9618/41/M/J/21\n7\nThe following bubble sort pseudocode algorithm sorts the data in into descending (c)\ntheArray\nnumerical order. There are incomplete statements. five\nPROCEDURE bubbleSort()\nDECLARE temp : INTEGER\n0 to ………………………………… FOR x\n0 to ………………………………… FOR y\nIF theArray[y] ………………………………… theArray[y + 1] THEN\ntheArray[y] temp\n………………………………… theArray[y]\n………………………………… theArray[y + 1]\nENDIF\nNEXT y\nNEXT x\nENDPROCEDURE\nWrite program code for the procedure to sort the data in into\nbubbleSort() arrayData\ndescending order.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[6]\n[Turn over © UCLES 2021 9618/41/M/J/21"
    },
    {
      "id": "9618-2021-mj-41-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2021-mj-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_41.pdf?download=true",
        "source_pages": [
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30
        ],
        "marks": 31
      },
      "text_excerpt": "A computer game requires users to travel around a world to find and open treasure chests. Each 3\ntreasure chest has a mathematics question inside. The user enters the answer. The number of\npoints awarded depends on the number of attempts before the user gives the correct answer.\nThe program will be created using object-oriented programming (OOP).\nThe following class diagram describes the class .\nTreasureChest\nTreasureChest\nquestion : STRING // stores the question\nanswer : INTEGER // stores the answer\npoints : INTEGER // stores the maximum possible number of\npoints available for this chest\nconstructor() // takes question, answer and points as\nparameters and creates an instance of an\nobject\ngetQuestion() // returns the question\ncheckAnswer() // takes the user’s answer as a parameter and\nreturns True if it is correct,\notherwise returns False\ngetPoints() // takes the number of attempts as a\nparameter and returns the number of\npoints awarded\nCreate a new program. (a)\nWrite program code to declare the class .\nTreasureChest\nDo write any other methods. not\nThe attributes are private.\nIf you are using the Python programming language, include attribute declarations using\ncomments.\nSave your program as question3.\nCopy and paste the program code into in the evidence document. part 3(a)\n[5]\n© UCLES 2021 9618/41/M/J/21\n9\nThe text file stores data for five questions, in the order of (b)\nTreasureChestData.txt\nquestion, answer, points.\nFor example, the first three lines of the file are for the first question:\nquestion\n2*2\nanswer\n4\npoints\n10\nWrite program code for the procedure, to:\nreadData()\n• read each question, answer and points from the text file\n• create an object of type for each question\nTreasureChest\n• declare an array named of type\narrayTreasure TreasureChest\n• append each object to the array\n• use exception handling to output an appropriate message if the file is not found.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[8]\n[Turn over © UCLES 2021 9618/41/M/J/21\n10\nThe main program repeats each question until the user inputs the correct answer. The (c)\nnumber of points awarded depends on the number of attempts before the user gives the\ncorrect answer.\nThe class has a method that returns the question. (i)\nTreasureChest getQuestion()\nWrite the method .\ngetQuestion()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(i)\n[1]\nThe class has a method that takes the user’s (ii)\nTreasureChest checkAnswer()\nanswer as a parameter. It returns if the answer is correct and otherwise.\nTrue False\nWrite the method .\ncheckAnswer()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(ii)\n[3]\nThe class has a method that takes the number of (iii)\nTreasureChest getPoints()\nattempts as a parameter.\n• If the number of attempts is 1, it returns the value of .\npoints\n• If the number of attempts is 2, it returns the integer value of divided by\npoints\n2 ( )."
    },
    {
      "id": "9618-2021-mj-42-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 24,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 24
      },
      "text_excerpt": "An unordered linked list uses a 1D array to store the data. 1\nEach item in the linked list is of a record type, , with a field and a field .\nnode data nextNode\nThe current contents of the linked list are:\nIndex 0 startPointer data nextNode\n0 1 1\n5 1 5 4 emptyList\n2 6 7\n3 7 -1\n4 2 2\n5 0 6\n6 0 8\n7 56 3\n8 0 9\n9 0 -1\nThe following is pseudocode for the record type . (a)\nnode\nTYPE node\nDECLARE data : INTEGER\nDECLARE nextNode : INTEGER\nENDTYPE\nWrite program code to declare the record type .\nnode\nSave your program as question1.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\n© UCLES 2021 9618/42/M/J/21\n3\nWrite program code for the main program. (b)\nDeclare a 1D array of type with the identifier , and initialise it with the data\nnode linkedList\nshown in the table on page 2. Declare the pointers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[4]\nThe procedure takes the array and as parameters. The (c)\noutputNodes() startPointer\nprocedure outputs the data from the linked list by following the values.\nnextNode\nWrite program code for the procedure . (i)\noutputNodes()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)(i)\n[6]\nEdit the main program to call the procedure . (ii)\noutputNodes()\nTake a screenshot to show the output of the procedure .\noutputNodes()\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(c)(ii)\n[1]\n[Turn over © UCLES 2021 9618/42/M/J/21\n4\nThe function, , takes the linked list and pointers as parameters, then takes as (d)\naddNode()\ninput the data to be added to the end of the .\nlinkedList\nThe function adds the node in the next available space, updates the pointers and returns\n. If there are no empty nodes, it returns .\nTrue False\nWrite program code for the function . (i)\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[7]\nEdit the main program to: (ii)\n• call\naddNode()\n• output an appropriate message depending on the result returned from\naddNode()\n• call twice; once before calling and once after calling\noutputNodes() addNode()\n.\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(ii)\n[3]\nTest your program by inputting the data value and take a screenshot to show the (iii)\n5\noutput.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(iii)\n[1]\n© UCLES 2021 9618/42/M/J/21\n5\nBLANK PAGE\n[Turn over © UCLES 2021 9618/42/M/J/21"
    },
    {
      "id": "9618-2021-mj-42-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_42.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_42.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20
        ],
        "marks": 20
      },
      "text_excerpt": "A program stores the following ten integers in a 1D array with the identifier . 2\narrayData\n10 5 6 7 1 12 13 15 21 8\nWrite program code for a to: (a) new program\n• declare the global 1D array, , with ten elements\narrayData\n• initialise in the main program using the data values shown.\narrayData\nSave your program as question2.\nCopy and paste the program code into in the evidence document. part 2(a)\n[2]\nA function, , takes an integer as a parameter and performs a linear (b) (i)\nlinearSearch()\nsearch on to find the parameter value. It returns if it was found and\narrayData True\nif it was not found.\nFalse\nWrite program code for the function .\nlinearSearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[6]\nEdit the main program to: (ii)\n• allow the user to input an integer value\n• pass the value to as the parameter\nlinearSearch()\n• output an appropriate message to tell the user whether the search value was found\nor not.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[4]\nTest your program with one value that is in the array and one value that is not in the (iii)\narray.\nTake a screenshot to show the result of each test.\nSave your program.\nCopy and paste the screenshots into in the evidence document. part 2(b)(iii)\n[2]\n© UCLES 2021 9618/42/M/J/21\n7\nThe following bubble sort pseudocode algorithm sorts the data in into descending (c)\ntheArray\nnumerical order. There are incomplete statements. five\nPROCEDURE bubbleSort()\nDECLARE temp : INTEGER\n0 to ………………………………… FOR x\n0 to ………………………………… FOR y\nIF theArray[y] ………………………………… theArray[y + 1] THEN\ntheArray[y] temp\n………………………………… theArray[y]\n………………………………… theArray[y + 1]\nENDIF\nNEXT y\nNEXT x\nENDPROCEDURE\nWrite program code for the procedure to sort the data in into\nbubbleSort() arrayData\ndescending order.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[6]\n[Turn over © UCLES 2021 9618/42/M/J/21"
    },
    {
      "id": "9618-2021-mj-42-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_42.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2021-mj-42-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_42.pdf?download=true",
        "source_pages": [
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30
        ],
        "marks": 31
      },
      "text_excerpt": "A computer game requires users to travel around a world to find and open treasure chests. Each 3\ntreasure chest has a mathematics question inside. The user enters the answer. The number of\npoints awarded depends on the number of attempts before the user gives the correct answer.\nThe program will be created using object-oriented programming (OOP).\nThe following class diagram describes the class .\nTreasureChest\nTreasureChest\nquestion : STRING // stores the question\nanswer : INTEGER // stores the answer\npoints : INTEGER // stores the maximum possible number of\npoints available for this chest\nconstructor() // takes question, answer and points as\nparameters and creates an instance of an\nobject\ngetQuestion() // returns the question\ncheckAnswer() // takes the user’s answer as a parameter and\nreturns True if it is correct,\notherwise returns False\ngetPoints() // takes the number of attempts as a\nparameter and returns the number of\npoints awarded\nCreate a new program. (a)\nWrite program code to declare the class .\nTreasureChest\nDo write any other methods. not\nThe attributes are private.\nIf you are using the Python programming language, include attribute declarations using\ncomments.\nSave your program as question3.\nCopy and paste the program code into in the evidence document. part 3(a)\n[5]\n© UCLES 2021 9618/42/M/J/21\n9\nThe text file stores data for five questions, in the order of (b)\nTreasureChestData.txt\nquestion, answer, points.\nFor example, the first three lines of the file are for the first question:\nquestion\n2*2\nanswer\n4\npoints\n10\nWrite program code for the procedure, to:\nreadData()\n• read each question, answer and points from the text file\n• create an object of type for each question\nTreasureChest\n• declare an array named of type\narrayTreasure TreasureChest\n• append each object to the array\n• use exception handling to output an appropriate message if the file is not found.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[8]\n[Turn over © UCLES 2021 9618/42/M/J/21\n10\nThe main program repeats each question until the user inputs the correct answer. The (c)\nnumber of points awarded depends on the number of attempts before the user gives the\ncorrect answer.\nThe class has a method that returns the question. (i)\nTreasureChest getQuestion()\nWrite the method .\ngetQuestion()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(i)\n[1]\nThe class has a method that takes the user’s (ii)\nTreasureChest checkAnswer()\nanswer as a parameter. It returns if the answer is correct and otherwise.\nTrue False\nWrite the method .\ncheckAnswer()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(ii)\n[3]\nThe class has a method that takes the number of (iii)\nTreasureChest getPoints()\nattempts as a parameter.\n• If the number of attempts is 1, it returns the value of .\npoints\n• If the number of attempts is 2, it returns the integer value of divided by\npoints\n2 ( )."
    },
    {
      "id": "9618-2021-mj-43-q01",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 24,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q01-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q01-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 24
      },
      "text_excerpt": "An unordered linked list uses a 1D array to store the data. 1\nEach item in the linked list is of a record type, , with a field and a field .\nnode data nextNode\nThe current contents of the linked list are:\nIndex 0 startPointer data nextNode\n0 1 1\n5 1 5 4 emptyList\n2 6 7\n3 7 -1\n4 2 2\n5 0 6\n6 0 8\n7 56 3\n8 0 9\n9 0 -1\nThe following is pseudocode for the record type . (a)\nnode\nTYPE node\nDECLARE data : INTEGER\nDECLARE nextNode : INTEGER\nENDTYPE\nWrite program code to declare the record type .\nnode\nSave your program as question1.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\n© UCLES 2021 9618/43/M/J/21\n3\nWrite program code for the main program. (b)\nDeclare a 1D array of type with the identifier , and initialise it with the data\nnode linkedList\nshown in the table on page 2. Declare the pointers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[4]\nThe procedure takes the array and as parameters. The (c)\noutputNodes() startPointer\nprocedure outputs the data from the linked list by following the values.\nnextNode\nWrite program code for the procedure . (i)\noutputNodes()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)(i)\n[6]\nEdit the main program to call the procedure . (ii)\noutputNodes()\nTake a screenshot to show the output of the procedure .\noutputNodes()\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(c)(ii)\n[1]\n[Turn over © UCLES 2021 9618/43/M/J/21\n4\nThe function, , takes the linked list and pointers as parameters, then takes as (d)\naddNode()\ninput the data to be added to the end of the .\nlinkedList\nThe function adds the node in the next available space, updates the pointers and returns\n. If there are no empty nodes, it returns .\nTrue False\nWrite program code for the function . (i)\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[7]\nEdit the main program to: (ii)\n• call\naddNode()\n• output an appropriate message depending on the result returned from\naddNode()\n• call twice; once before calling and once after calling\noutputNodes() addNode()\n.\naddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(ii)\n[3]\nTest your program by inputting the data value and take a screenshot to show the (iii)\n5\noutput.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(iii)\n[1]\n© UCLES 2021 9618/43/M/J/21\n5\nBLANK PAGE\n[Turn over © UCLES 2021 9618/43/M/J/21"
    },
    {
      "id": "9618-2021-mj-43-q02",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_43.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_43.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20
        ],
        "marks": 20
      },
      "text_excerpt": "A program stores the following ten integers in a 1D array with the identifier . 2\narrayData\n10 5 6 7 1 12 13 15 21 8\nWrite program code for a to: (a) new program\n• declare the global 1D array, , with ten elements\narrayData\n• initialise in the main program using the data values shown.\narrayData\nSave your program as question2.\nCopy and paste the program code into in the evidence document. part 2(a)\n[2]\nA function, , takes an integer as a parameter and performs a linear (b) (i)\nlinearSearch()\nsearch on to find the parameter value. It returns if it was found and\narrayData True\nif it was not found.\nFalse\nWrite program code for the function .\nlinearSearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[6]\nEdit the main program to: (ii)\n• allow the user to input an integer value\n• pass the value to as the parameter\nlinearSearch()\n• output an appropriate message to tell the user whether the search value was found\nor not.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[4]\nTest your program with one value that is in the array and one value that is not in the (iii)\narray.\nTake a screenshot to show the result of each test.\nSave your program.\nCopy and paste the screenshots into in the evidence document. part 2(b)(iii)\n[2]\n© UCLES 2021 9618/43/M/J/21\n7\nThe following bubble sort pseudocode algorithm sorts the data in into descending (c)\ntheArray\nnumerical order. There are incomplete statements. five\nPROCEDURE bubbleSort()\nDECLARE temp : INTEGER\n0 to ………………………………… FOR x\n0 to ………………………………… FOR y\nIF theArray[y] ………………………………… theArray[y + 1] THEN\ntheArray[y] temp\n………………………………… theArray[y]\n………………………………… theArray[y + 1]\nENDIF\nNEXT y\nNEXT x\nENDPROCEDURE\nWrite program code for the procedure to sort the data in into\nbubbleSort() arrayData\ndescending order.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[6]\n[Turn over © UCLES 2021 9618/43/M/J/21"
    },
    {
      "id": "9618-2021-mj-43-q03",
      "subject": "9618",
      "year": 2021,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_qp_43.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-may-june/qp/9618_s21_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-mj-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2021-mj-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-mj-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-may-june/ms/9618_s21_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-May-June/9618_s21_ms_43.pdf?download=true",
        "source_pages": [
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30
        ],
        "marks": 31
      },
      "text_excerpt": "A computer game requires users to travel around a world to find and open treasure chests. Each 3\ntreasure chest has a mathematics question inside. The user enters the answer. The number of\npoints awarded depends on the number of attempts before the user gives the correct answer.\nThe program will be created using object-oriented programming (OOP).\nThe following class diagram describes the class .\nTreasureChest\nTreasureChest\nquestion : STRING // stores the question\nanswer : INTEGER // stores the answer\npoints : INTEGER // stores the maximum possible number of\npoints available for this chest\nconstructor() // takes question, answer and points as\nparameters and creates an instance of an\nobject\ngetQuestion() // returns the question\ncheckAnswer() // takes the user’s answer as a parameter and\nreturns True if it is correct,\notherwise returns False\ngetPoints() // takes the number of attempts as a\nparameter and returns the number of\npoints awarded\nCreate a new program. (a)\nWrite program code to declare the class .\nTreasureChest\nDo write any other methods. not\nThe attributes are private.\nIf you are using the Python programming language, include attribute declarations using\ncomments.\nSave your program as question3.\nCopy and paste the program code into in the evidence document. part 3(a)\n[5]\n© UCLES 2021 9618/43/M/J/21\n9\nThe text file stores data for five questions, in the order of (b)\nTreasureChestData.txt\nquestion, answer, points.\nFor example, the first three lines of the file are for the first question:\nquestion\n2*2\nanswer\n4\npoints\n10\nWrite program code for the procedure, to:\nreadData()\n• read each question, answer and points from the text file\n• create an object of type for each question\nTreasureChest\n• declare an array named of type\narrayTreasure TreasureChest\n• append each object to the array\n• use exception handling to output an appropriate message if the file is not found.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[8]\n[Turn over © UCLES 2021 9618/43/M/J/21\n10\nThe main program repeats each question until the user inputs the correct answer. The (c)\nnumber of points awarded depends on the number of attempts before the user gives the\ncorrect answer.\nThe class has a method that returns the question. (i)\nTreasureChest getQuestion()\nWrite the method .\ngetQuestion()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(i)\n[1]\nThe class has a method that takes the user’s (ii)\nTreasureChest checkAnswer()\nanswer as a parameter. It returns if the answer is correct and otherwise.\nTrue False\nWrite the method .\ncheckAnswer()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)(ii)\n[3]\nThe class has a method that takes the number of (iii)\nTreasureChest getPoints()\nattempts as a parameter.\n• If the number of attempts is 1, it returns the value of .\npoints\n• If the number of attempts is 2, it returns the integer value of divided by\npoints\n2 ( )."
    },
    {
      "id": "9618-2021-on-31-q01",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2021-on-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 7
      },
      "text_excerpt": "Numbers are stored in a computer using floating-point representation with: 1 (a)\n• 12 bits for the mantissa\n• 4 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nWrite the normalised floating-point representation of the following unsigned binary (i)\nnumber using this system.\n1011100.011001\nWorking .............................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\nMantissa Exponent\n[2]\nState the consequence of storing the binary number in as a floating-point (ii) part (a)(i)\nnumber in this system. Justify your answer.\nConsequence ....................................................................................................................\n...........................................................................................................................................\nJustification .......................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n[2]\nExplain the reason why binary numbers are stored in normalised form. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q02",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q02",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Draw line from each programming paradigm to its description. 2 one most appropriate\nProgramming paradigm Description\nPrograms using the instruction set of a\nprocessor\nDeclarative\nPrograms based on events such as user\nactions or sensor outputs\nImperative\nPrograms using the concepts of class,\ninheritance, encapsulation and\npolymorphism\nLow-level\nPrograms with an explicit sequence of\ncommands that update the program state,\nwith or without procedure calls Object-oriented\nPrograms that specify the desired result\nrather than how to get to it\n[4]"
    },
    {
      "id": "9618-2021-on-31-q03",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q03",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Enumerated and pointer are two non-composite data types. 3\nWrite to create an enumerated type called to include these parts sold in (a) pseudocode\nParts\na computer shop:\nMonitor, CPU, SSD, HDD, LaserPrinter, Keyboard, Mouse\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nWrite to create a pointer type called that will reference the (b) pseudocode\nSelectParts\nmemory location in which the current part name is stored.\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q04",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-on-31-q04-p01.png",
        "9618-topic-16-system-software/assets/9618-2021-on-31-q04-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 7
      },
      "text_excerpt": "The following syntax diagrams for a particular programming language show the syntax of: 4\n• a digit\n• a capital letter\n• a character.\ndigit capital letter\n0 A\n1 E\n2 I\n3 O\n4 U\n5 character\n$\n6\n%\n7\n&\n8\n*\n9\n#\nWrite the Backus-Naur Form (BNF) notation of the syntax diagram for character. (a)\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2021 9618/31/O/N/21\n5\nA password must begin with a character and be followed by one or more digits or capital (b)\nletters.\nState an example of a valid password. (i)\n..................................................................................................................................... [1]\nA valid password is represented by the syntax diagram: (ii)\npassword\ncharacter digit\ncapital letter\nWrite the BNF notation of the syntax diagram for password.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n[Turn over © UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q05",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-on-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q05",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "Compare sequential and serial methods of file organisation. 5 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\nState the most suitable method of file access when a record is referenced by a unique (b)\naddress on a disk-type storage medium.\n............................................................................................................................................. [1]\nState the most suitable method of file access when a bank stores its data records in ascending (c)\norder of account number.\n............................................................................................................................................. [1]\n© UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q06",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2021-on-31-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q06",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Explain how packet switching is used to transfer messages across the internet. 6 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [5]\nOutline the function of a router in packet switching. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q07",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-31-q07-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-31-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 10
      },
      "text_excerpt": "Write the Boolean expression that corresponds to the given truth table as a sum-of-products. 7 (a)\nINPUT OUTPUT\nA B C D Z\n0 0 0 0 0\n0 0 0 1 0\n0 0 1 0 0\n0 0 1 1 0\n0 1 0 0 0\n0 1 0 1 0\n0 1 1 0 0\n0 1 1 1 0\n1 0 0 0 0\n1 0 0 1 1\n1 0 1 0 0\n1 0 1 1 1\n1 1 0 0 1\n1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 1\n= ............................................................................................................................................ Z\n............................................................................................................................................. [3]\n© UCLES 2021 9618/31/O/N/21\n9\nComplete the Karnaugh map (K-map) for the given truth table. (b) (i)\nAB\n00 01 11 10 CD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) of 1s in the K-map to produce an optimal (ii)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to as a simplified (iii) part b(ii)\nsum-of-products.\n= ..................................................................................................................................... Z\n..................................................................................................................................... [2]\nWrite the simplified Boolean expression for your answer to b(iii). (iv) part\n= ..................................................................................................................................... Z\n..................................................................................................................................... [1]\n[Turn over © UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q08",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2021-on-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q08",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "Describe the purpose of the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) 8 (a)\nprotocols.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how SSL/TLS protocols are used when a client-server communication is initiated. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n© UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q09",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2021-on-31-q09-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2021-on-31-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 10
      },
      "text_excerpt": "The diagram shown represents an artificial neural network. 9 (a)\nOutput\nLayer\nInput\nLayer\nHidden Hidden\nHidden Layer 1 Layer 3\nLayer 2\nState the reason for having multiple hidden layers in an artificial neural network. (i)\n...........................................................................................................................................\n..................................................................................................................................... [1]\nExplain how artificial neural networks enable machine learning. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n[Turn over © UCLES 2021 9618/31/O/N/21\n12\nFind the shortest path between the Home and School nodes using the A* algorithm. (b)\nShow your working in the table provided.\nThe first two rows in the table have been completed.\n14\nHome\n9 h = 10 4 g = 1\n5 A C\n3\n7\nB 6\n2\n6\nD 6\n3\n7\nF\n1\n2\n3\nE\n3 5\nSchool\nNode Cost from Home node (g) Heuristic (h) Total (f = g + h)\nHome 0 14 14\nA 1 10 11\nFinal path\n[5]\n© UCLES 2021 9618/31/O/N/21"
    },
    {
      "id": "9618-2021-on-31-q10",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_31.pdf?download=true",
      "source_pages": [
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-31-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-31-q10-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-31-q10-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-31-q10-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-31-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_31.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 13
      },
      "text_excerpt": "State essential features of recursion. 10 (a) three\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n3 ................................................................................................................................................\n...................................................................................................................................................\n[3]\nExplain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement (b)\nrecursion.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nIdentify ADTs other than a stack. (c) two\n1 ................................................................................................................................................\n2 ................................................................................................................................................\n[2]\n[Turn over © UCLES 2021 9618/31/O/N/21\n14\nThe function checks whether a stack is full. (d)\nStackFull()\nThe function uses the variable to represent the pointer to the most recent\nTopOfStack\nposition used on the stack, and the variable to represent the maximum size of the stack.\nMax\nAssume and are global variables.\nTopOfStack Max\nFUNCTION StackFull() RETURNS BOOLEAN\nIF TopOfStack = Max THEN\nRETURN TRUE\nELSE\nRETURN FALSE\nENDIF\nENDFUNCTION\nAn algorithm is required to add a new integer data element to a stack.\nAddInteger\nThe stack is implemented as an array .\nArrayStack\nThe function calls and returns an appropriate message.\nAddInteger() StackFull()\nComplete the pseudocode for the function .\nAddInteger()\nFUNCTION AddInteger(NewInt"
    },
    {
      "id": "9618-2021-on-32-q01",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2021-on-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 7
      },
      "text_excerpt": "Numbers are stored in a computer using floating-point representation with: 1 (a)\n• 12 bits for the mantissa\n• 4 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nWrite the normalised floating-point representation of the following unsigned binary (i)\nnumber using this system.\n1011100.011001\nWorking .............................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\nMantissa Exponent\n[2]\nState the consequence of storing the binary number in as a floating-point (ii) part (a)(i)\nnumber in this system. Justify your answer.\nConsequence ....................................................................................................................\n...........................................................................................................................................\nJustification .......................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n[2]\nExplain the reason why binary numbers are stored in normalised form. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q02",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q02",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Draw line from each programming paradigm to its description. 2 one most appropriate\nProgramming paradigm Description\nPrograms using the instruction set of a\nprocessor\nDeclarative\nPrograms based on events such as user\nactions or sensor outputs\nImperative\nPrograms using the concepts of class,\ninheritance, encapsulation and\npolymorphism\nLow-level\nPrograms with an explicit sequence of\ncommands that update the program state,\nwith or without procedure calls Object-oriented\nPrograms that specify the desired result\nrather than how to get to it\n[4]"
    },
    {
      "id": "9618-2021-on-32-q03",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q03",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Enumerated and pointer are two non-composite data types. 3\nWrite to create an enumerated type called to include these parts sold in (a) pseudocode\nParts\na computer shop:\nMonitor, CPU, SSD, HDD, LaserPrinter, Keyboard, Mouse\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nWrite to create a pointer type called that will reference the (b) pseudocode\nSelectParts\nmemory location in which the current part name is stored.\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q04",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2021-on-32-q04-p01.png",
        "9618-topic-16-system-software/assets/9618-2021-on-32-q04-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 7
      },
      "text_excerpt": "The following syntax diagrams for a particular programming language show the syntax of: 4\n• a digit\n• a capital letter\n• a character.\ndigit capital letter\n0 A\n1 E\n2 I\n3 O\n4 U\n5 character\n$\n6\n%\n7\n&\n8\n*\n9\n#\nWrite the Backus-Naur Form (BNF) notation of the syntax diagram for character. (a)\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2021 9618/32/O/N/21\n5\nA password must begin with a character and be followed by one or more digits or capital (b)\nletters.\nState an example of a valid password. (i)\n..................................................................................................................................... [1]\nA valid password is represented by the syntax diagram: (ii)\npassword\ncharacter digit\ncapital letter\nWrite the BNF notation of the syntax diagram for password.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n[Turn over © UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q05",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2021-on-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q05",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "Compare sequential and serial methods of file organisation. 5 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\nState the most suitable method of file access when a record is referenced by a unique (b)\naddress on a disk-type storage medium.\n............................................................................................................................................. [1]\nState the most suitable method of file access when a bank stores its data records in ascending (c)\norder of account number.\n............................................................................................................................................. [1]\n© UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q06",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2021-on-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q06",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Explain how packet switching is used to transfer messages across the internet. 6 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [5]\nOutline the function of a router in packet switching. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q07",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-32-q07-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2021-on-32-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 10
      },
      "text_excerpt": "Write the Boolean expression that corresponds to the given truth table as a sum-of-products. 7 (a)\nINPUT OUTPUT\nA B C D Z\n0 0 0 0 0\n0 0 0 1 0\n0 0 1 0 0\n0 0 1 1 0\n0 1 0 0 0\n0 1 0 1 0\n0 1 1 0 0\n0 1 1 1 0\n1 0 0 0 0\n1 0 0 1 1\n1 0 1 0 0\n1 0 1 1 1\n1 1 0 0 1\n1 1 0 1 1\n1 1 1 0 1\n1 1 1 1 1\n= ............................................................................................................................................ Z\n............................................................................................................................................. [3]\n© UCLES 2021 9618/32/O/N/21\n9\nComplete the Karnaugh map (K-map) for the given truth table. (b) (i)\nAB\n00 01 11 10 CD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) of 1s in the K-map to produce an optimal (ii)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to as a simplified (iii) part b(ii)\nsum-of-products.\n= ..................................................................................................................................... Z\n..................................................................................................................................... [2]\nWrite the simplified Boolean expression for your answer to b(iii). (iv) part\n= ..................................................................................................................................... Z\n..................................................................................................................................... [1]\n[Turn over © UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q08",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2021-on-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q08",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "Describe the purpose of the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) 8 (a)\nprotocols.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how SSL/TLS protocols are used when a client-server communication is initiated. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n© UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q09",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2021-on-32-q09-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2021-on-32-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 10
      },
      "text_excerpt": "The diagram shown represents an artificial neural network. 9 (a)\nOutput\nLayer\nInput\nLayer\nHidden Hidden\nHidden Layer 1 Layer 3\nLayer 2\nState the reason for having multiple hidden layers in an artificial neural network. (i)\n...........................................................................................................................................\n..................................................................................................................................... [1]\nExplain how artificial neural networks enable machine learning. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n[Turn over © UCLES 2021 9618/32/O/N/21\n12\nFind the shortest path between the Home and School nodes using the A* algorithm. (b)\nShow your working in the table provided.\nThe first two rows in the table have been completed.\n14\nHome\n9 h = 10 4 g = 1\n5 A C\n3\n7\nB 6\n2\n6\nD 6\n3\n7\nF\n1\n2\n3\nE\n3 5\nSchool\nNode Cost from Home node (g) Heuristic (h) Total (f = g + h)\nHome 0 14 14\nA 1 10 11\nFinal path\n[5]\n© UCLES 2021 9618/32/O/N/21"
    },
    {
      "id": "9618-2021-on-32-q10",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_32.pdf?download=true",
      "source_pages": [
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-32-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-32-q10-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-32-q10-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2021-on-32-q10-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-32-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_32.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 13
      },
      "text_excerpt": "State essential features of recursion. 10 (a) three\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n3 ................................................................................................................................................\n...................................................................................................................................................\n[3]\nExplain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement (b)\nrecursion.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nIdentify ADTs other than a stack. (c) two\n1 ................................................................................................................................................\n2 ................................................................................................................................................\n[2]\n[Turn over © UCLES 2021 9618/32/O/N/21\n14\nThe function checks whether a stack is full. (d)\nStackFull()\nThe function uses the variable to represent the pointer to the most recent\nTopOfStack\nposition used on the stack, and the variable to represent the maximum size of the stack.\nMax\nAssume and are global variables.\nTopOfStack Max\nFUNCTION StackFull() RETURNS BOOLEAN\nIF TopOfStack = Max THEN\nRETURN TRUE\nELSE\nRETURN FALSE\nENDIF\nENDFUNCTION\nAn algorithm is required to add a new integer data element to a stack.\nAddInteger\nThe stack is implemented as an array .\nArrayStack\nThe function calls and returns an appropriate message.\nAddInteger() StackFull()\nComplete the pseudocode for the function .\nAddInteger()\nFUNCTION AddInteger(NewInt"
    },
    {
      "id": "9618-2021-on-41-q01",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2021-on-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_41.pdf?download=true",
        "source_pages": [
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 17
      },
      "text_excerpt": "Study the following pseudocode for a recursive function. 1\nFUNCTION Unknown(BYVAL X, BYVAL Y : INTEGER) RETURNS INTEGER\nIF X < Y THEN\nOUTPUT X + Y\nRETURN (Unknown(X + 1, Y) * 2)\nELSE\nIF X = Y THEN\nRETURN 1\nELSE\nOUTPUT X + Y\nRETURN (Unknown(X - 1, Y) DIV 2)\nENDIF\nENDIF\nENDFUNCTION\nThe operator returns the integer value after division e.g. would give\nDIV 13 DIV 2 6\nWrite program code to declare the function . (a)\nUnknown()\nSave your program as 1. question\nCopy and paste the program code into in the evidence document. part 1(a)\n[3]\n© UCLES 2021 9618/41/O/N/21\n3\nThe main program needs to run all of the following function calls and output the result (b) three\nof each call:\nUnknown(10, 15)\nUnknown(10, 10)\nUnknown(15, 10)\nFor each of the function calls, the main program needs to: (i) three\n• output the value of the two parameters\n• call the function with those parameters\n• output the return value.\nWrite the program code for the main program.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(i)\n[3]\nTake a screenshot to show the output from (b)(i). (ii) part\nCopy and paste the screenshot into in the evidence document. part 1(b)(ii)\n[2]\nRewrite the function as an iterative function, . (c)\nUnknown() IterativeUnknown()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[7]\nThe iterative function needs to be called times with the same parameters as in (b). (d) three part\nFor each of the function calls, the main program needs to: (i) three\n• output the value of the two parameters\n• call the iterative function with those parameters\n• output the return value.\nAmend the main program to perform these tasks.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[1]\nTake one or more screenshots to show the output of both functions for each set of (ii)\nparameters.\nCopy and paste the screenshot(s) into in the evidence document. part 1(d)(ii)\n[1]\n[Turn over © UCLES 2021 9618/41/O/N/21"
    },
    {
      "id": "9618-2021-on-41-q02",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2021-on-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2021-on-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2021-on-41-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_41.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16
        ],
        "marks": 30
      },
      "text_excerpt": "A program, written using object-oriented programming, stores pictures as objects. 2\nThe program stores the dimensions of the picture (width and height), the colour of the frame (e.g.\nblack), and a description of the picture (e.g. flowers).\nThe class has the following attributes and methods.\nPicture\nDescription : STRING // stores a description of the picture\nWidth : INTEGER // stores the width e.g. 30\nHeight : INTEGER // stores the height e.g. 40\nFrameColour : STRING // stores the colour e.g. black\nConstructor() // takes all four values as parameters and\nsets them to the private attributes\nGetDescription() // returns the description of the picture\nGetHeight() // returns the height\nGetWidth() // returns the width\nGetColour() // returns the frame colour\nSetDescription() // takes the new description as a parameter\nand writes the value to description\nThe constructor takes the picture description, frame colour, height, and width as parameters (a)\nand sets these to the private attributes.\nWrite the program code to declare the class and its constructor.\nPicture\nDo not write any other methods.\nUse your language appropriate constructor. All attributes should be private.\nIf you are writing in Python programming language, include attribute declarations using\ncomments.\nSave your program as 2. question\nCopy and paste the program code into in the evidence document. part 2(a)\n[5]\nThe four get methods return the associated attribute, for example, (b)\nGetDescription()\nreturns the description of the picture.\nWrite the get methods. four\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[3]\n© UCLES 2021 9618/41/O/N/21\n5\nThe method takes a new description as a parameter, and writes this (c)\nSetDescription()\nvalue to the appropriate attribute.\nWrite the method .\nSetDescription()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[2]\nWrite program code to declare an array of type with 100 elements. (d)\nPicture\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[1]\nThe text file stores the data for the pictures in the order: description, width, (e)\nPictures.txt\nheight, colour.\nFor example, for the first picture in the text file:\nis the description\nFlowers\nis the width\n45\nis the height\n50\nis the frame colour.\nblack\nThe data read into the program from the text file is stored in an array of type .\nPicture\nThe main program and the function will need to access the array data.\nThe function :\nReadData()\n• opens the file\nPictures.txt\n• reads the data from the file\n• creates a new object of type for each picture\nPicture\n• writes each object to the array\n• raises an exception if the file cannot be found\n• counts and returns the number of pictures in the array.\nWrite program code for the function .\nReadData()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[8]\nThe main program calls the function . (f)\nReadData()\nWrit"
    },
    {
      "id": "9618-2021-on-41-q03",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 34,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2021-on-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2021-on-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2021-on-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2021-on-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_41.pdf?download=true",
        "source_pages": [
          17,
          18,
          19,
          20,
          21,
          22,
          23
        ],
        "marks": 34
      },
      "text_excerpt": "An ordered binary tree stores integer data in ascending numerical order. 3\nThe data for the binary tree is stored in a 2D array with the following structure:\nLeftPointer Data RightPointer\nIndex [0] [1] [2]\n1 10 2 [0]\n-1 5 -1 [1]\n-1 16 -1 [2]\nEach row in the table represents one node on the tree.\nThe number represents a null pointer.\n-1\nThe 2D array, , is declared with space for 20 nodes. (a)\nArrayNodes\nEach node has a left pointer, data and right pointer.\nThe program also initialises the:\n• to (null); this points to the first node in the binary tree\nRootPointer -1\n• to ; this points to the first empty node in the array.\nFreeNode 0\nWrite program code to declare , and in the main\nArrayNodes RootPointer FreeNode\nprogram.\nIf you are writing in Python programming language, include attribute declarations using\ncomments.\nSave your program as 3. question\nCopy and paste the program code into in the evidence document. part 3(a)\n[4]\nThe procedure adds a new node to the array . (b)\nAddNode() ArrayNodes\nThe procedure needs to:\n• take the array, root pointer and free node pointer as parameters\n• ask the user to enter the data and read this in\n• add the node to the root pointer if the tree is empty\n• otherwise, follow the pointers to find the position for the data item to be added\n• store the data in the location and update all pointers.\n© UCLES 2021 9618/41/O/N/21\n9\nThere are incomplete statements in the following pseudocode for the procedure . six\nAddNode()\nPROCEDURE AddNode(BYREF ArrayNodes[] : ARRAY OF INTEGER,\nBYREF RootPointer : INTEGER, BYREF FreeNode : INTEGER)\nOUTPUT \"Enter the data\"\nINPUT NodeData\nIF FreeNode <= 19 THEN\n←\n-1 ArrayNodes[FreeNode, 0]\n←\n……………………………………… ArrayNodes[FreeNode, 1]\n←\n-1 ArrayNodes[FreeNode, 2]\nIF RootPointer = ……………………………………… THEN\n←\n0 RootPointer\nELSE\n←\nFALSE Placed\n←\nRootPointer CurrentNode\nWHILE Placed = FALSE\nIF NodeData < ArrayNodes[CurrentNode, 1] THEN\nIF ArrayNodes[CurrentNode, 0] = -1 THEN\n←\n……………………………………… ArrayNodes[CurrentNode, 0]\n←\nTRUE Placed\nELSE\n←\nArrayNodes[CurrentNode, 0] ………………………………………\nENDIF\nELSE\nIF ArrayNodes[CurrentNode, 2] = -1 THEN\n←\nFreeNode ArrayNodes[CurrentNode, 2]\n←\n……………………………………… Placed\nELSE\n←\nArrayNodes[CurrentNode, 2] CurrentNode\nENDIF\nENDIF\nENDWHILE\nENDIF\n←\n……………………………………… + 1 FreeNode\nELSE\nOUTPUT(\"Tree is full\")\nENDIF\nENDPROCEDURE\nWrite for the procedure . program code\nAddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[8]\n[Turn over © UCLES 2021 9618/41/O/N/21\n10\nThe procedure outputs the data in each element in , in the order (c)\nPrintAll() ArrayNodes\nthey are stored in the array.\nEach element is printed in a row in the order:\nLeftPointer Data RightPointer\nFor example:\n1 20 -1\n-1 10 -1\nWrite program code for the procedure .\nPrintAll()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[4]\nThe main program should loop 10 times, each time calling the procedure . It (d)\nAddNode()\nshould then call the proc"
    },
    {
      "id": "9618-2021-on-42-q01",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2021-on-42-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_42.pdf?download=true",
        "source_pages": [
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 17
      },
      "text_excerpt": "Study the following pseudocode for a recursive function. 1\nFUNCTION Unknown(BYVAL X, BYVAL Y : INTEGER) RETURNS INTEGER\nIF X < Y THEN\nOUTPUT X + Y\nRETURN (Unknown(X + 1, Y) * 2)\nELSE\nIF X = Y THEN\nRETURN 1\nELSE\nOUTPUT X + Y\nRETURN (Unknown(X - 1, Y) DIV 2)\nENDIF\nENDIF\nENDFUNCTION\nThe operator returns the integer value after division e.g. would give\nDIV 13 DIV 2 6\nWrite program code to declare the function . (a)\nUnknown()\nSave your program as 1. question\nCopy and paste the program code into in the evidence document. part 1(a)\n[3]\n© UCLES 2021 9618/42/O/N/21\n3\nThe main program needs to run all of the following function calls and output the result (b) three\nof each call:\nUnknown(10, 15)\nUnknown(10, 10)\nUnknown(15, 10)\nFor each of the function calls, the main program needs to: (i) three\n• output the value of the two parameters\n• call the function with those parameters\n• output the return value.\nWrite the program code for the main program.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(i)\n[3]\nTake a screenshot to show the output from (b)(i). (ii) part\nCopy and paste the screenshot into in the evidence document. part 1(b)(ii)\n[2]\nRewrite the function as an iterative function, . (c)\nUnknown() IterativeUnknown()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[7]\nThe iterative function needs to be called times with the same parameters as in (b). (d) three part\nFor each of the function calls, the main program needs to: (i) three\n• output the value of the two parameters\n• call the iterative function with those parameters\n• output the return value.\nAmend the main program to perform these tasks.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[1]\nTake one or more screenshots to show the output of both functions for each set of (ii)\nparameters.\nCopy and paste the screenshot(s) into in the evidence document. part 1(d)(ii)\n[1]\n[Turn over © UCLES 2021 9618/42/O/N/21"
    },
    {
      "id": "9618-2021-on-42-q02",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_42.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2021-on-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2021-on-42-q02-p03.png",
        "9618-practical-programming/assets/9618-2021-on-42-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_42.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16
        ],
        "marks": 30
      },
      "text_excerpt": "A program, written using object-oriented programming, stores pictures as objects. 2\nThe program stores the dimensions of the picture (width and height), the colour of the frame (e.g.\nblack), and a description of the picture (e.g. flowers).\nThe class has the following attributes and methods.\nPicture\nDescription : STRING // stores a description of the picture\nWidth : INTEGER // stores the width e.g. 30\nHeight : INTEGER // stores the height e.g. 40\nFrameColour : STRING // stores the colour e.g. black\nConstructor() // takes all four values as parameters and\nsets them to the private attributes\nGetDescription() // returns the description of the picture\nGetHeight() // returns the height\nGetWidth() // returns the width\nGetColour() // returns the frame colour\nSetDescription() // takes the new description as a parameter\nand writes the value to description\nThe constructor takes the picture description, frame colour, height, and width as parameters (a)\nand sets these to the private attributes.\nWrite the program code to declare the class and its constructor.\nPicture\nDo not write any other methods.\nUse your language appropriate constructor. All attributes should be private.\nIf you are writing in Python programming language, include attribute declarations using\ncomments.\nSave your program as 2. question\nCopy and paste the program code into in the evidence document. part 2(a)\n[5]\nThe four get methods return the associated attribute, for example, (b)\nGetDescription()\nreturns the description of the picture.\nWrite the get methods. four\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[3]\n© UCLES 2021 9618/42/O/N/21\n5\nThe method takes a new description as a parameter, and writes this (c)\nSetDescription()\nvalue to the appropriate attribute.\nWrite the method .\nSetDescription()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[2]\nWrite program code to declare an array of type with 100 elements. (d)\nPicture\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[1]\nThe text file stores the data for the pictures in the order: description, width, (e)\nPictures.txt\nheight, colour.\nFor example, for the first picture in the text file:\nis the description\nFlowers\nis the width\n45\nis the height\n50\nis the frame colour.\nblack\nThe data read into the program from the text file is stored in an array of type .\nPicture\nThe main program and the function will need to access the array data.\nThe function :\nReadData()\n• opens the file\nPictures.txt\n• reads the data from the file\n• creates a new object of type for each picture\nPicture\n• writes each object to the array\n• raises an exception if the file cannot be found\n• counts and returns the number of pictures in the array.\nWrite program code for the function .\nReadData()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[8]\nThe main program calls the function . (f)\nReadData()\nWrit"
    },
    {
      "id": "9618-2021-on-42-q03",
      "subject": "9618",
      "year": 2021,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 34,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_qp_42.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2021-oct-nov/qp/9618_w21_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2021-on-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2021-on-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2021-on-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2021-on-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2021-on-42-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2021-on-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2021-oct-nov/ms/9618_w21_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2021-Oct-Nov/9618_w21_ms_42.pdf?download=true",
        "source_pages": [
          17,
          18,
          19,
          20,
          21,
          22,
          23
        ],
        "marks": 34
      },
      "text_excerpt": "An ordered binary tree stores integer data in ascending numerical order. 3\nThe data for the binary tree is stored in a 2D array with the following structure:\nLeftPointer Data RightPointer\nIndex [0] [1] [2]\n1 10 2 [0]\n-1 5 -1 [1]\n-1 16 -1 [2]\nEach row in the table represents one node on the tree.\nThe number represents a null pointer.\n-1\nThe 2D array, , is declared with space for 20 nodes. (a)\nArrayNodes\nEach node has a left pointer, data and right pointer.\nThe program also initialises the:\n• to (null); this points to the first node in the binary tree\nRootPointer -1\n• to ; this points to the first empty node in the array.\nFreeNode 0\nWrite program code to declare , and in the main\nArrayNodes RootPointer FreeNode\nprogram.\nIf you are writing in Python programming language, include attribute declarations using\ncomments.\nSave your program as 3. question\nCopy and paste the program code into in the evidence document. part 3(a)\n[4]\nThe procedure adds a new node to the array . (b)\nAddNode() ArrayNodes\nThe procedure needs to:\n• take the array, root pointer and free node pointer as parameters\n• ask the user to enter the data and read this in\n• add the node to the root pointer if the tree is empty\n• otherwise, follow the pointers to find the position for the data item to be added\n• store the data in the location and update all pointers.\n© UCLES 2021 9618/42/O/N/21\n9\nThere are incomplete statements in the following pseudocode for the procedure . six\nAddNode()\nPROCEDURE AddNode(BYREF ArrayNodes[] : ARRAY OF INTEGER,\nBYREF RootPointer : INTEGER, BYREF FreeNode : INTEGER)\nOUTPUT \"Enter the data\"\nINPUT NodeData\nIF FreeNode <= 19 THEN\n←\n-1 ArrayNodes[FreeNode, 0]\n←\n……………………………………… ArrayNodes[FreeNode, 1]\n←\n-1 ArrayNodes[FreeNode, 2]\nIF RootPointer = ……………………………………… THEN\n←\n0 RootPointer\nELSE\n←\nFALSE Placed\n←\nRootPointer CurrentNode\nWHILE Placed = FALSE\nIF NodeData < ArrayNodes[CurrentNode, 1] THEN\nIF ArrayNodes[CurrentNode, 0] = -1 THEN\n←\n……………………………………… ArrayNodes[CurrentNode, 0]\n←\nTRUE Placed\nELSE\n←\nArrayNodes[CurrentNode, 0] ………………………………………\nENDIF\nELSE\nIF ArrayNodes[CurrentNode, 2] = -1 THEN\n←\nFreeNode ArrayNodes[CurrentNode, 2]\n←\n……………………………………… Placed\nELSE\n←\nArrayNodes[CurrentNode, 2] CurrentNode\nENDIF\nENDIF\nENDWHILE\nENDIF\n←\n……………………………………… + 1 FreeNode\nELSE\nOUTPUT \"Tree is full\"\nENDIF\nENDPROCEDURE\nWrite for the procedure . program code\nAddNode()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[8]\n[Turn over © UCLES 2021 9618/42/O/N/21\n10\nThe procedure outputs the data in each element in , in the order (c)\nPrintAll() ArrayNodes\nthey are stored in the array.\nEach element is printed in a row in the order:\nLeftPointer Data RightPointer\nFor example:\n1 20 -1\n-1 10 -1\nWrite program code for the procedure .\nPrintAll()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[4]\nThe main program should loop 10 times, each time calling the procedure . It (d)\nAddNode()\nshould then call the proce"
    },
    {
      "id": "9618-2022-mj-31-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q01-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 8
      },
      "text_excerpt": "Data types can be defined using pseudocode. 1\nThe data type, , is defined in pseudocode as:\nLibraryRecord\nTYPE LibraryRecord\nDECLARE Title : STRING\nDECLARE Fiction : BOOLEAN\nDECLARE Author : STRING\nDECLARE NumberOfCopies : INTEGER\nENDTYPE\nA variable, , is declared in pseudocode as:\nLibraryBook\nDECLARE LibraryBook : LibraryRecord\nWrite statements to assign: (a) pseudocode\n• to of\nA Level Computer Science Title LibraryBook\n• to of .\nFALSE Fiction LibraryBook\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe type definition for is changed. (b)\nLibraryRecord\nThe value for must be between and inclusive. (i)\nNumberOfCopies 1 10\nWrite the updated line of from the type definition of to pseudocode\nLibraryRecord\nimplement the change.\n...........................................................................................................................................\n..................................................................................................................................... [1]\nEvery copy of every book is now uniquely identified by an accession number, (ii)\n, as it is added to the library. Each library record will include one or\nAccessionNumber\nmore accession numbers. Each accession number is an integer.\nWrite the extra line of needed in the type definition of . pseudocode\nLibraryRecord\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n© UCLES 2022 9618/31/M/J/22\n3\nA record is a user-defined composite data type. (c)\nExplain what is meant by a type. user-defined composite data\nInclude an example of user-defined composite data type in your answer. another\n...................................................................................................................................................\n...................................................................................................................................................\n....................................................."
    },
    {
      "id": "9618-2022-mj-31-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q02-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "A declarative language is used to represent the following facts about cats. 2\n01 type(leopard, wild).\n02 type(lion, wild).\n03 type(cheetah, wild).\n04 type(savannah, hybrid).\n05 type(persian, domestic).\n06\n07 hair(leopard, medium).\n08 hair(lion, short).\n09 hair(cheetah, medium).\n10 hair(savannah, medium).\n11 hair(persian, long).\n12\n13 spots(leopard, yes).\n14 spots(lion, no).\n15 spots(cheetah, yes).\n16 spots(savannah, yes).\n17 spots(persian, no).\nThese clauses have the following meaning:\nClause Meaning\nA leopard is a type of wild cat. 01\nA lion has short hair. 08\nA savannah has spots. 16\n© UCLES 2022 9618/31/M/J/22\n5\nMore facts are to be included. A is a wild cat with short hair. (a) caracal\nWrite the additional clauses to record these facts.\n.............................................................................................................................................\n18\n.............................................................................................................................................\n19\n[2]\nUsing the variable , the goal: (b)\nCat\nhair(Cat, medium)\nreturns\nCat = leopard, cheetah, savannah\nWrite the result returned by the goal:\nhair(Cat, long)\n................................................................................................................................. [1]\nCat =\nWrite the goal, using the variable , to find all the domestic cats. (c) (i)\nPet\n...........................................................................................................................................\n..................................................................................................................................... [1]\nWrite the goal, using the variable , to find all the wild cats with spots. (ii)\nWildSpotty\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n[Turn over © UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-31-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-mj-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 8
      },
      "text_excerpt": "Data can be sent over networks using either circuit switching or packet switching. 3\nDescribe both methods of data transmission. Include a different advantage and disadvantage for\neach method.\nCircuit switching ...............................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nAdvantage ........................................................................................................................................\n..........................................................................................................................................................\nDisadvantage ...................................................................................................................................\n..........................................................................................................................................................\nPacket switching ..............................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nAdvantage ........................................................................................................................................\n..........................................................................................................................................................\nDisadvantage ...................................................................................................................................\n..........................................................................................................................................................\n[8]\n© UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-31-q04",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q04",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are 4\ntwo types of processor.\nDescribe what is meant by and processors. (a) RISC CISC\nRISC .........................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nCISC .........................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nIdentify differences between RISC and CISC processors. (b) two\n1 ................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[2]\n[Turn over © UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-31-q05",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-mj-31-q05-p01.png",
        "9618-topic-16-system-software/assets/9618-2022-mj-31-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 12
      },
      "text_excerpt": "Part of a program’s calculations uses the integer variables , , , and . 5\nj k m n p\nj = 3\nk = 2\nm = 10\nn = (j + k)/(j - k)\np = m * (m - j * k)\nWrite the Reverse Polish Notation (RPN) for the expression: (a)\n(j + k)/(j - k)\n............................................................................................................................................. [2]\nShow the changing contents of the stack as the value for is calculated from its RPN (b) (i)\np\nexpression:\nm m j k * - *\n[4]\nDescribe the main steps in the evaluation of this RPN expression using a stack. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n© UCLES 2022 9618/31/M/J/22\n9\nState uses of a stack. (c) two other\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n[2]"
    },
    {
      "id": "9618-2022-mj-31-q06",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-31-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "A virtual machine is used to emulate a new computer system. 6\nDescribe benefits and limitation of using a virtual machine for this purpose. two one\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nLimitation ..........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[6]\n[Turn over © UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-31-q07",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q07-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-31-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q07",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 11
      },
      "text_excerpt": "A program is to be written using Object-Oriented Programming (OOP) for a shop that sells knitting 7\nyarn. There are three types of yarn: acrylic, wool or mix.\nThe following data are stored for each type.\n• Name\n• Colour\n• Batch code\n• Weight\n• Number of balls of yarn in stock (can be edited)\n• Type of yarn\nThe following statements apply to yarn.\n• Acrylic can be soft or not soft.\n• Wool can be lamb, merino or alpaca.\n• Mix contains a percentage of acrylic.\nEach type of yarn has a method that will display all the information about the yarn.\nComplete this class inheritance diagram to show the properties, and inheritance. (a) methods\nYarn\nName: STRING\nColour: STRING\nBatchCode: STRING\nWeight: INTEGER\nNumberBalls: INTEGER\nType: STRING\nConstructor()\nEditNumberBalls()\nYarnInfo()\nAcrylic Wool Mix\nPercentage: INTEGER\nConstructor() .......................................... ..........................................\nYarnInfo()\nConstructor() Constructor()\n.......................................... ..........................................\n[5]\n© UCLES 2022 9618/31/M/J/22\n11\nDescribe what is meant by the terms properties, and inheritance. (b) methods\nProperties .................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nMethods ....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nInheritance ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[6]\n[Turn over © UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-31-q08",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-mj-31-q08-p01.png",
        "9618-topic-17-security/assets/9618-2022-mj-31-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q08",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 8
      },
      "text_excerpt": "A message is to be sent securely. Software uses a key to encrypt the message before it is sent. 8\nGive reasons for using key cryptography. (a) (i) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n[2]\nGive methods of key cryptography that can be used. (ii) two\n1 ........................................................................................................................................\n2 ........................................................................................................................................\n[2]\nWhen there is a secure exchange of key(s), the message is sent. (b)\nThe use of quantum cryptography is being considered for the secure exchange.\nState possible benefits of using quantum cryptography. (i) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n[2]\nState possible drawbacks of using quantum cryptography. (ii) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n...................................................................................................................................."
    },
    {
      "id": "9618-2022-mj-31-q09",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_31.pdf?download=true",
      "source_pages": [
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-31-q09-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-31-q09-p02.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-31-q09-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-31-q09",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_31.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 10
      },
      "text_excerpt": "The table shows assembly language instructions for a processor that has one general purpose 9\nregister, the Accumulator (ACC).\nInstruction Explanation\nLabel Opcode Operand\nLoad the number n to ACC\nLDM #n\nLoad the contents of the given address to ACC\nLDD <address>\nThe address to be used is at the given address\nLDI <address>\nLoad the contents of this second address to ACC\nAdd the contents of the given address to the ACC\nADD <address>\nStore the contents of the ACC at the given address\nSTO <address>\nGives a symbolic address <label> to the memory\nlocation with the contents <data>\n<label>: <data>\n<label> can be used in place of <address>\n# denotes a denary number, e.g. #123\nThe address contains the value and the address contains the value . (a)\n500 100 100 20\nState the addressing mode and the contents of ACC after each instruction has been executed.\nAddressing mode ...............................................................................................\nLDM #500\nContents of ACC .................................................................................................\nAddressing mode ...............................................................................................\nLDD 500\nContents of ACC .................................................................................................\nAddressing mode ................................................................................................\nLDI 500\nContents of ACC .................................................................................................\n[3]\n© UCLES 2022 9618/31/M/J/22\n15\nUse only the given instruction set to write code to: (b) assembly language\n• use the constant which needs to be stored\n20\n• add this constant to the value stored in the address contained in the variable\nY\n• store the result in variable .\nZ\nInstruction\nLabel Opcode Operand\n[7]\n© UCLES 2022 9618/31/M/J/22\n16\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2022 9618/31/M/J/22"
    },
    {
      "id": "9618-2022-mj-32-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-32-q01-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-32-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q01",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 9
      },
      "text_excerpt": "Data types can be defined using pseudocode. 1\nThe data type, , is defined in pseudocode as:\nBuildingRecord\nTYPE BuildingRecord\nDECLARE BuildingID : INTEGER\nDECLARE BuildingGroup : STRING\nDECLARE OwnerName : STRING\nDECLARE BuildingAddress : STRING\nDECLARE DateLastSold : DATE\nDECLARE PriceLastSold : REAL\nENDTYPE\nA variable, , is declared in pseudocode as:\nBuildingRegister\nDECLARE BuildingRegister : BuildingRecord\nWrite statements to assign: (a) pseudocode\n• to the of\n1067 BuildingID BuildingRegister\n• to the of\nhouse BuildingGroup BuildingRegister\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe type definition for is changed. The data type for is (b)\nBuildingRecord BuildingGroup\nchanged to an enumerated type, , with values of house, bungalow, apartment\nBuildingType\nand farm.\nWrite the type declaration for in pseudocode. (i)\nBuildingType\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nWrite the new declaration for in pseudocode. (ii)\nBuildingGroup\n...........................................................................................................................................\n..................................................................................................................................... [1]\nWrite the new statement to assign to of (iii) pseudocode\nhouse BuildingGroup\n.\nBuildingRegister\n...........................................................................................................................................\n..................................................................................................................................... [1]\n© UCLES 2022 9618/32/M/J/22\n3\nThe program is to be rewritten using Object-Oriented Programming (OOP). The data type (c)\nis to be changed to a class, .\nBuildingRecord BuildingClass\nThe properties for are , , ,\nBuildingClass BuildingID BuildingGroup OwnerName\n, and .\nBuildingAddress DateLastSold PriceLastSold\nAll the properties are s"
    },
    {
      "id": "9618-2022-mj-32-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-mj-32-q02-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-mj-32-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q02",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 7
      },
      "text_excerpt": "A declarative language is used to represent the following facts about a school. 2\n01 teaches(alan, mathematics).\n02 teaches(ioana, geography).\n03 teaches(nina, history).\n04 teaches(alan, statistics).\n05\n06 studies(ahmed, history).\n07 studies(freya, history).\n08 studies(kim, history).\n09 studies(freya, geography).\n10 studies(hua, mathematics).\n11 studies(hua, statistics).\n12 studies(hua, geography).\n13\n14 tutors(alan, kim).\n15 tutors(alan, hua).\n16 tutors(alan, freya).\n17 tutors(nina, ahmed).\nThese clauses have the following meaning:\nClause Meaning\nAlan teaches mathematics.\n01\nAhmed studies history.\n06\nAlan is Kim’s tutor.\n14\nMore facts are to be included. Sam studies history and Nina is his tutor. (a)\nWrite the additional clauses to record these facts.\n.............................................................................................................................................\n18\n.............................................................................................................................................\n19\n[2]\nUsing the variable , the goal: (b)\nStudent\nstudies(Student, history)\nreturns\nStudent = freya, ahmed, kim\nWrite the result returned by the goal:\nstudies(Student, geography)\n....................................................................................................................... [1]\nStudent =\n© UCLES 2022 9618/32/M/J/22\n5\nWrite the goal, using the variable , to find all the students who have a tutor that teaches (c)\nX\nthem. For example, Hua has Alan for a tutor and is also taught mathematics by Alan.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2022-mj-32-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-mj-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 8
      },
      "text_excerpt": "The TCP/IP protocol suite has four layers. The application layer provides user services. 3\nIdentify protocols used by this layer. Describe the use of each protocol. (a) two\nProtocol 1 .................................................................................................................................\nDescription ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nProtocol 2 .................................................................................................................................\nDescription ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nIdentify layers of the TCP/IP protocol suite. Describe the function of each layer. (b) two other\nLayer 1 ......................................................................................................................................\nDescription ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nLayer 2 ......................................................................................................................................\nDescription ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\n[Turn over © UCLES 2022 9618/32/M/J/22"
    },
    {
      "id": "9618-2022-mj-32-q04",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-mj-32-q04-p01.png",
        "9618-topic-16-system-software/assets/9618-2022-mj-32-q04-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 13
      },
      "text_excerpt": "The following syntax diagrams show the syntax of: 4\n• a variable\n• an unsigned integer\n• a letter\n• a digit\n• an operator\n• an assignment statement.\nvariable\nletter unsigned integer\nunsigned integer\ndigit digit\nletter digit\nX 1\nY 2\nZ 3\noperator\n+\n–\n*\nassignment\nstatement\n= variable variable operator variable\nThe following assignment statements are invalid. State the reason in each case. (a)\nX1 = Y2 – 12\nReason .....................................................................................................................................\n...................................................................................................................................................\nZ = Y12 + Z1\nReason .....................................................................................................................................\n...................................................................................................................................................\n[2]\n© UCLES 2022 9618/32/M/J/22\n7\nComplete the Backus-Naur Form (BNF) for the syntax diagrams shown. (b)\nhas been completed for you.\n<letter>\n..................................................................................................................\n<variable> ::=\n...................................................................................................................................................\n.................................................................................................\n<unsigned_integer> ::=\n...................................................................................................................................................\n<letter> ::= X | Y | Z\n..........................................................................................................................\n<digit> ::=\n...................................................................................................................................................\n..................................................................................................................\n<operator> ::=\n...................................................................................................................................................\n........................................................................................\n<assignment_statement> ::=\n...................................................................................................................................................\n[5]\nThe syntax of an assignment statement is changed to allow each of the variables on the (c)\nright-hand side of the ‘ ’ symbol to be either a variable or an unsigned integer.\n=\nDraw a syntax diagram for the new syntax of the statement. (i) assignment\n[3]\nWrite the Backus-Naur Form (BNF) for your syntax diagram. (ii)\n...........................................................................................................................................\n....."
    },
    {
      "id": "9618-2022-mj-32-q05",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q05",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "There are four basic categories of computer architecture. Single Instruction Single Data (SISD) is 5\none architecture.\nIdentify the categories of computer architecture. three other\nDescribe each category that you identify.\nArchitecture 1 ...................................................................................................................................\nDescription .......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nArchitecture 2 ...................................................................................................................................\nDescription .......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nArchitecture 3 ...................................................................................................................................\nDescription .......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[6]\n© UCLES 2022 9618/32/M/J/22"
    },
    {
      "id": "9618-2022-mj-32-q06",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 5
      },
      "text_excerpt": "A logic circuit has two inputs and B, and two outputs and F. 6 A E\nA\nE\nB\nF\nComplete the truth table for this logic circuit. (a)\nINPUT OUTPUT\nA B E F\n0 0\n0 1\n1 0\n1 1\n[2]\nState the name of this logic circuit. (b) (i)\n..................................................................................................................................... [1]\nState the purpose of each output and F. (ii) E\nPurpose of ..................................................................................................................... E\nPurpose of ...................................................................................................................... F\n[2]\n[Turn over © UCLES 2022 9618/32/M/J/22"
    },
    {
      "id": "9618-2022-mj-32-q07",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-mj-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q07",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 10
      },
      "text_excerpt": "A digital signature is used to validate the authenticity of an electronic message. 7\nIn order to produce a digital signature, a digital certificate is required.\nState how a digital certificate is obtained. (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nExplain how a digital signature is produced before the message is sent. (b) (i)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [3]\nExplain how the digital signature can be checked on receipt to ensure that the message (ii)\nhas not been altered during transmission.\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n............"
    },
    {
      "id": "9618-2022-mj-32-q08",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-mj-32-q08-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-mj-32-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 13
      },
      "text_excerpt": "A binary search or a linear search can be used to look for a specific value in an array. 8\nComplete this pseudocode algorithm for a linear search. (a)\nDECLARE MyList : ARRAY[0:9] OF INTEGER\nDECLARE MaxIndex : INTEGER\nDECLARE Index : INTEGER\nDECLARE Found : BOOLEAN\n...................................................................................................\nDECLARE ValueToFind :\nINPUT ValueToFind\n←\nFALSE Found\n←\n0 Index\n......................................................................................................................... ←\nMaxIndex\nREPEAT\nIF MyList[Index] = ValueToFind THEN\n←\nTRUE Found\nENDIF\n......................................................................................................................... ←\nIndex\nUNTIL Found OR Index > MaxIndex\nIF Found THEN\nOUTPUT \"Value found at position \", Index\nELSE\n..............................................................................................................................\nOUTPUT\nENDIF\n[4]\nState the necessary condition for a binary search. (b) (i)\n...........................................................................................................................................\n..................................................................................................................................... [1]\nDescribe how to perform a binary search. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n[Turn over © UCLES 2022 9618/32/M/J/22\n12\nExplain how the performance of a binary search varies according to the number of values (iii)\nin the array.\n...........................................................................................................................................\n...........................................................................................................................................\n..............................................................................."
    },
    {
      "id": "9618-2022-mj-32-q09",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_32.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-32-q09",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 4
      },
      "text_excerpt": "State the reasons for including exception handling routines when writing a program. 9\nInclude an example of an exception in your answer.\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [4]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2022 9618/32/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q01-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 8
      },
      "text_excerpt": "Data types can be defined using pseudocode. 1\nThe data type, , is defined in pseudocode as:\nLibraryRecord\nTYPE LibraryRecord\nDECLARE Title : STRING\nDECLARE Fiction : BOOLEAN\nDECLARE Author : STRING\nDECLARE NumberOfCopies : INTEGER\nENDTYPE\nA variable, , is declared in pseudocode as:\nLibraryBook\nDECLARE LibraryBook : LibraryRecord\nWrite statements to assign: (a) pseudocode\n• to of\nA Level Computer Science Title LibraryBook\n• to of .\nFALSE Fiction LibraryBook\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe type definition for is changed. (b)\nLibraryRecord\nThe value for must be between and inclusive. (i)\nNumberOfCopies 1 10\nWrite the updated line of from the type definition of to pseudocode\nLibraryRecord\nimplement the change.\n...........................................................................................................................................\n..................................................................................................................................... [1]\nEvery copy of every book is now uniquely identified by an accession number, (ii)\n, as it is added to the library. Each library record will include one or\nAccessionNumber\nmore accession numbers. Each accession number is an integer.\nWrite the extra line of needed in the type definition of . pseudocode\nLibraryRecord\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n© UCLES 2022 9618/33/M/J/22\n3\nA record is a user-defined composite data type. (c)\nExplain what is meant by a type. user-defined composite data\nInclude an example of user-defined composite data type in your answer. another\n...................................................................................................................................................\n...................................................................................................................................................\n....................................................."
    },
    {
      "id": "9618-2022-mj-33-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q02-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "A declarative language is used to represent the following facts about cats. 2\n01 type(leopard, wild).\n02 type(lion, wild).\n03 type(cheetah, wild).\n04 type(savannah, hybrid).\n05 type(persian, domestic).\n06\n07 hair(leopard, medium).\n08 hair(lion, short).\n09 hair(cheetah, medium).\n10 hair(savannah, medium).\n11 hair(persian, long).\n12\n13 spots(leopard, yes).\n14 spots(lion, no).\n15 spots(cheetah, yes).\n16 spots(savannah, yes).\n17 spots(persian, no).\nThese clauses have the following meaning:\nClause Meaning\nA leopard is a type of wild cat. 01\nA lion has short hair. 08\nA savannah has spots. 16\n© UCLES 2022 9618/33/M/J/22\n5\nMore facts are to be included. A is a wild cat with short hair. (a) caracal\nWrite the additional clauses to record these facts.\n.............................................................................................................................................\n18\n.............................................................................................................................................\n19\n[2]\nUsing the variable , the goal: (b)\nCat\nhair(Cat, medium)\nreturns\nCat = leopard, cheetah, savannah\nWrite the result returned by the goal:\nhair(Cat, long)\n................................................................................................................................. [1]\nCat =\nWrite the goal, using the variable , to find all the domestic cats. (c) (i)\nPet\n...........................................................................................................................................\n..................................................................................................................................... [1]\nWrite the goal, using the variable , to find all the wild cats with spots. (ii)\nWildSpotty\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n[Turn over © UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-mj-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 8
      },
      "text_excerpt": "Data can be sent over networks using either circuit switching or packet switching. 3\nDescribe both methods of data transmission. Include a different advantage and disadvantage for\neach method.\nCircuit switching ...............................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nAdvantage ........................................................................................................................................\n..........................................................................................................................................................\nDisadvantage ...................................................................................................................................\n..........................................................................................................................................................\nPacket switching ..............................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nAdvantage ........................................................................................................................................\n..........................................................................................................................................................\nDisadvantage ...................................................................................................................................\n..........................................................................................................................................................\n[8]\n© UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q04",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q04",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are 4\ntwo types of processor.\nDescribe what is meant by and processors. (a) RISC CISC\nRISC .........................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nCISC .........................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nIdentify differences between RISC and CISC processors. (b) two\n1 ................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[2]\n[Turn over © UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q05",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-mj-33-q05-p01.png",
        "9618-topic-16-system-software/assets/9618-2022-mj-33-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 12
      },
      "text_excerpt": "Part of a program’s calculations uses the integer variables , , , and . 5\nj k m n p\nj = 3\nk = 2\nm = 10\nn = (j + k)/(j - k)\np = m * (m - j * k)\nWrite the Reverse Polish Notation (RPN) for the expression: (a)\n(j + k)/(j - k)\n............................................................................................................................................. [2]\nShow the changing contents of the stack as the value for is calculated from its RPN (b) (i)\np\nexpression:\nm m j k * - *\n[4]\nDescribe the main steps in the evaluation of this RPN expression using a stack. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [4]\n© UCLES 2022 9618/33/M/J/22\n9\nState uses of a stack. (c) two other\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n[2]"
    },
    {
      "id": "9618-2022-mj-33-q06",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-33-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "A virtual machine is used to emulate a new computer system. 6\nDescribe benefits and limitation of using a virtual machine for this purpose. two one\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nLimitation ..........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[6]\n[Turn over © UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q07",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q07-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-mj-33-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q07",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 11
      },
      "text_excerpt": "A program is to be written using Object-Oriented Programming (OOP) for a shop that sells knitting 7\nyarn. There are three types of yarn: acrylic, wool or mix.\nThe following data are stored for each type.\n• Name\n• Colour\n• Batch code\n• Weight\n• Number of balls of yarn in stock (can be edited)\n• Type of yarn\nThe following statements apply to yarn.\n• Acrylic can be soft or not soft.\n• Wool can be lamb, merino or alpaca.\n• Mix contains a percentage of acrylic.\nEach type of yarn has a method that will display all the information about the yarn.\nComplete this class inheritance diagram to show the properties, and inheritance. (a) methods\nYarn\nName: STRING\nColour: STRING\nBatchCode: STRING\nWeight: INTEGER\nNumberBalls: INTEGER\nType: STRING\nConstructor()\nEditNumberBalls()\nYarnInfo()\nAcrylic Wool Mix\nPercentage: INTEGER\nConstructor() .......................................... ..........................................\nYarnInfo()\nConstructor() Constructor()\n.......................................... ..........................................\n[5]\n© UCLES 2022 9618/33/M/J/22\n11\nDescribe what is meant by the terms properties, and inheritance. (b) methods\nProperties .................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nMethods ....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nInheritance ................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[6]\n[Turn over © UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-33-q08",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-mj-33-q08-p01.png",
        "9618-topic-17-security/assets/9618-2022-mj-33-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q08",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 8
      },
      "text_excerpt": "A message is to be sent securely. Software uses a key to encrypt the message before it is sent. 8\nGive reasons for using key cryptography. (a) (i) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n[2]\nGive methods of key cryptography that can be used. (ii) two\n1 ........................................................................................................................................\n2 ........................................................................................................................................\n[2]\nWhen there is a secure exchange of key(s), the message is sent. (b)\nThe use of quantum cryptography is being considered for the secure exchange.\nState possible benefits of using quantum cryptography. (i) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n[2]\nState possible drawbacks of using quantum cryptography. (ii) two\n1 ........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n2 ........................................................................................................................................\n...........................................................................................................................................\n...................................................................................................................................."
    },
    {
      "id": "9618-2022-mj-33-q09",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_33.pdf?download=true",
      "source_pages": [
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-33-q09-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-33-q09-p02.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-mj-33-q09-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-33-q09",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 10
      },
      "text_excerpt": "The table shows assembly language instructions for a processor that has one general purpose 9\nregister, the Accumulator (ACC).\nInstruction Explanation\nLabel Opcode Operand\nLoad the number n to ACC\nLDM #n\nLoad the contents of the given address to ACC\nLDD <address>\nThe address to be used is at the given address\nLDI <address>\nLoad the contents of this second address to ACC\nAdd the contents of the given address to the ACC\nADD <address>\nStore the contents of the ACC at the given address\nSTO <address>\nGives a symbolic address <label> to the memory\nlocation with the contents <data>\n<label>: <data>\n<label> can be used in place of <address>\n# denotes a denary number, e.g. #123\nThe address contains the value and the address contains the value . (a)\n500 100 100 20\nState the addressing mode and the contents of ACC after each instruction has been executed.\nAddressing mode ...............................................................................................\nLDM #500\nContents of ACC .................................................................................................\nAddressing mode ...............................................................................................\nLDD 500\nContents of ACC .................................................................................................\nAddressing mode ................................................................................................\nLDI 500\nContents of ACC .................................................................................................\n[3]\n© UCLES 2022 9618/33/M/J/22\n15\nUse only the given instruction set to write code to: (b) assembly language\n• use the constant which needs to be stored\n20\n• add this constant to the value stored in the address contained in the variable\nY\n• store the result in variable .\nZ\nInstruction\nLabel Opcode Operand\n[7]\n© UCLES 2022 9618/33/M/J/22\n16\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2022 9618/33/M/J/22"
    },
    {
      "id": "9618-2022-mj-41-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q01-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q01-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18
        ],
        "marks": 29
      },
      "text_excerpt": "The text file stores the players who have scored the top ten scores in a game, 1\nHighScore.txt\nin descending order of score. The file stores the 3-character name of the player, and their integer\nscore, in the order: player, score.\nFor example, the current top player in the text file:\nis the player name\nFYI\nis the score\n10 000\nThe program:\n• reads in the data from\nHighScore.txt\n• allows the user to enter a new player name and their score\n• if appropriate, inserts the new player (name and score) into the top ten\n• writes the top ten players (name and score) into a new text file\nNewHighScore.txt\nThe program stores the players and their scores in an array of 11 elements (10 elements to (a)\nbe read from the file, 1 element to be inserted by the user).\nWrite a program to declare one or more arrays, as global data structures, to store the player\nnames and their scores.\nSave your program as Question1_J2022.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\nThe procedure opens the file and reads the data into (b)\nReadHighScores() HighScore.txt\nthe data structure(s) declared in 1(a). part\nWrite program code to declare the procedure .\nReadHighScores()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[6]\n© UCLES 2022 9618/41/M/J/22\n3\nThe procedure outputs all the values in the data structure(s) in the (c)\nOutputHighScores()\nformat:\nPlayerName Score\nFor example, the first two data items:\nFYI 10 000\nABC 9 092\nWrite program code to declare the procedure .\nOutputHighScores()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[3]\nThe main program should first call and then . (d)\nReadHighScores() OutputHighScores()\nWrite the program code for the main program. (i)\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[2]\nTest your program. (ii)\nTake a screenshot to show the output from 1(d)(i). part\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\nThe main program needs to ask the user to input a new player name and a score. If this score (e)\nis in the top ten then it will create a new top ten list that includes this score.\nAmend the main program to ask the user to input a 3-character player name and an (i)\ninteger score that must be between 1 and 100 000 inclusive.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)(i)\n[3]\nWrite program code to declare a procedure that: (ii)\n• takes the player name and score as parameters\n• creates a new top ten list that includes the parameter if appropriate.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)(ii)\n[5]\n[Turn over © UCLES 2022 9618/41/M/J/22\n4\nAmend the main program to call the procedure from 1(e)(ii). (iii) part\nOutput the contents of the array before inserting the new player name and score, and\noutput the contents of the array after inserting the new playe"
    },
    {
      "id": "9618-2022-mj-41-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_41.pdf?download=true",
      "source_pages": [
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_41.pdf?download=true",
        "source_pages": [
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26
        ],
        "marks": 25
      },
      "text_excerpt": "A computer game is being developed using object-oriented programming. 2\nOne element of the game is a balloon. This is designed as the class .\nBalloon\nThe class has the following attributes and methods.\nBalloon\nThe health of the balloon Health : INTEGER\nThe colour of the balloon Colour : STRING\nThe item the balloon uses to defend itself DefenceItem : STRING\nInitialises the defence item and colour using the Constructor()\nparameters\nInitialises health to 100\nTakes the change as a parameter and adds this to the ChangeHealth()\nhealth\nReturns the defence item of the object GetDefenceItem()\nIf the health is 0 or less, it returns , otherwise it CheckHealth() TRUE\nreturns\nFALSE\nThe constructor takes the name of the defence item and the balloon’s colour as parameters (a)\nand sets these to the attributes. The health is initialised to .\n100\nWrite program code to declare the class and its constructor. Do not write any other\nBalloon\nmethods.\nUse your language appropriate constructor.\nAll attributes should be private. If you are writing in Python include attribute declarations using\ncomments.\nSave your program as Question2_J2022.\nCopy and paste the program code into in the evidence document. part 2(a)\n[5]\nThe get method returns the defence item of the object. (b)\nGetDefenceItem()\nAmend your program code to include the get method .\nGetDefenceItem()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[2]\n[Turn over © UCLES 2022 9618/41/M/J/22\n6\nThe object’s method takes an integer number as a parameter and adds (c)\nChangeHealth()\nthis to the health attribute of the object.\nAmend your program code to include the method .\nChangeHealth()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[2]\nThe object’s method returns if the health of the object is 0 or less (no (d)\nCheckHealth() TRUE\nhealth remaining) and returns otherwise (health remaining).\nFALSE\nAmend your program code to include the method .\nCheckHealth()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[2]\nAmend the main program to: (e)\n• take as input a defence item and colour from the user\n• create a new balloon with the identifier using the data input.\nBalloon1\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[3]\nThe function : (f)\nDefend()\n• takes a balloon object as a parameter\n• takes as input the strength of an opponent from the user\n• uses the method to subtract the strength input from the object’s\nChangeHealth()\nhealth\n• outputs the defence item of the balloon\n• checks the health of the object and outputs an appropriate message if it has no health\nremaining, or if it has health remaining\n• returns the amended balloon object.\nWrite program code to declare the function .\nDefend()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(f)\n[8]\n© UCLES 2022 9618/41/M/J/22\n7\nAmend the main program to call the "
    },
    {
      "id": "9618-2022-mj-41-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-mj-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_41.pdf?download=true",
        "source_pages": [
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34
        ],
        "marks": 21
      },
      "text_excerpt": "A program uses a circular queue to store strings. The queue is created as a 1D array, , 3\nQueueArray\nwith 10 string items.\nThe following data is stored about the queue:\n• the head pointer initialised to 0\n• the tail pointer initialised to 0\n• the number of items in the queue initialised to 0.\nDeclare the array, head pointer, tail pointer and number of items. (a)\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_J2022.\nCopy and paste the program code into in the evidence document. part 3(a)\n[2]\n© UCLES 2022 9618/41/M/J/22\n9\nThe function is written in pseudocode. The function adds to the queue. (b)\nEnqueue DataToAdd\nIt returns if the queue is full and returns if the item is added.\nFALSE TRUE\nThe function is incomplete, there are incomplete statements. five\nFUNCTION Enqueue(BYREF QueueArray[] : STRING, BYREF HeadPointer : INTEGER,\nBYREF TailPointer : INTEGER, NumberItems : INTEGER,\nDataToAdd : STRING) RETURNS BOOLEAN\n……………………………………\nIF NumberItems = THEN\n……………………………………\nRETURN\nENDIF\n…………………………………… ←\nDataToAdd QueueArray[ ]\nIF TailPointer >= 9 THEN\n…………………………………… ←\nTailPointer\nELSE\n←\nTailPointer + 1 TailPointer\nENDIF\n…………………………………… ←\nNumberItems NumberItems\nRETURN TRUE\nENDFUNCTION\nWrite program code for the function .\nEnqueue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[7]\nThe function returns if the queue is empty, or it returns the next data (c)\nDequeue() \"FALSE\"\nitem in the queue.\nWrite program code for the function .\nDequeue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[6]\n[Turn over © UCLES 2022 9618/41/M/J/22\n10\nAmend the main program to: (d) (i)\n• take as input 11 string values from the user\n• use the function to add each element to the queue\nEnqueue()\n• output an appropriate message to state whether each addition was successful, or\nnot\n• call function twice and output the return value each time.\nDequeue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)(i)\n[5]\nTest your program with the input data: (ii)\n\"A\" \"B\" \"C\" \"D\" \"E\" \"F\" \"G\" \"H\" \"I\" \"J\" \"K\"\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 3(d)(ii)\n[1]\n© UCLES 2022 9618/41/M/J/22\n11\nBLANK PAGE\n© UCLES 2022 9618/41/M/J/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is prod"
    },
    {
      "id": "9618-2022-mj-42-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12
        ],
        "marks": 25
      },
      "text_excerpt": "A program needs to use a stack data structure. The stack can store up to 10 integer elements. 1\nA 1D array is used to store the stack globally. The global variable\nStackData StackPointer\npoints to the next available space in the stack and is initialised to 0.\nWrite program code to declare the array and pointer as global data structures. Initialise the (a)\npointer to 0.\nSave your program as Question1_J22.\nCopy and paste the program code into in the evidence document. part 1(a)\n[3]\nWrite a procedure to output all 10 elements in the stack the value of . (b) and\nStackPointer\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[3]\nThe function takes an integer parameter and returns if the stack is full. If the (c)\nPush() FALSE\nstack is not full, it puts the parameter value on the stack, updates the relevant pointer and\nreturns .\nTRUE\nWrite program code for the function .\nPush()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[6]\n© UCLES 2022 9618/42/M/J/22\n3\nEdit the main program to test the function. The main program needs to: (d) (i)\nPush()\n• allow the user to enter 11 numbers and attempt to add these to the stack\n• output an appropriate message when a number is added to the stack\n• output an appropriate message when a number is not added to the stack if it is full\n• output the contents of the stack after attempting to add all 11 numbers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[5]\nTest your program from with the following 11 inputs: (ii) part 1(d)(i)\n11 12 13 14 15 16 17 18 19 20 21\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\nThe function returns if the stack is empty. If the stack is not empty, it returns the (e)\nPop() −1\nelement at the top of the stack and updates the relevant pointer.\nWrite program code for the function . (i)\nPop()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)(i)\n[5]\nAfter the code you wrote in the main program for 1(d)(i), add program code to: (ii) part\n• remove two elements from the stack using\nPop()\n• output the updated contents of the stack.\nTest your program and take a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 1(e)(ii)\n[2]\n[Turn over © UCLES 2022 9618/42/M/J/22"
    },
    {
      "id": "9618-2022-mj-42-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 23,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_42.pdf?download=true",
      "source_pages": [
        4,
        5,
        6
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_42.pdf?download=true",
        "source_pages": [
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24
        ],
        "marks": 23
      },
      "text_excerpt": "A 2D array stores data entered by a user. 2\nThe main program declares a 2D array of 10 by 10 integer elements. (a)\nThe array is initialised with a random number between 1 and 100 in each element.\nWrite program code for the main program.\nSave your program as Question2_J22.\nCopy and paste the program code into in the evidence document. part 2(a)\n[4]\nThe following bubble sort pseudocode algorithm sorts the data in the first dimension of the 2D (b)\narray into ascending numerical order.\n10 ArrayLength\n0 TO ArrayLength - 1 FOR X\n0 TO ArrayLength - 2 FOR Y\n0 TO ArrayLength - Y - 2 FOR Z\nIF ArrayData[X, Z] > ArrayData[X, Z + 1] THEN\nArrayData[X, Z] TempValue\nArrayData[X, Z+1] ArrayData[X, Z]\nTempValue ArrayData[X, Z + 1]\nENDIF\nNEXT Z\nNEXT Y\nNEXT X\nAmend your main program by writing program code to implement the bubble sort (i)\nalgorithm after the initialisation of the array elements.\nYou must use any built-in sorting functions for your programming language. not\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[5]\n© UCLES 2022 9618/42/M/J/22\n5\nWrite program code for a procedure to output all the values in the 2D array. The values (ii)\nshould be output as a 2D grid, with values in rows and columns.\nCall the procedure before and after your bubble sort code.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[3]\nTest your program. (iii)\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 2(b)(iii)\n[1]\n[Turn over © UCLES 2022 9618/42/M/J/22\n6\nThe following pseudocode function uses recursion to perform a binary search in the first row (c)\nof the array, for the value in the array .\nSearchValue SearchArray\nThe function returns if the item was not found, or it returns the index where it is found.\n−1\nThere are incomplete statements. six\nFUNCTION BinarySearch(SearchArray, Lower, Upper, SearchValue)RETURNS\nINTEGER\nIF Upper >= Lower THEN\n(Lower + (Upper – 1)) DIV ………………………………… Mid\nIF SearchArray[0, Mid] = ………………………………… THEN\nRETURN …………………………………\nELSE\nIF SearchArray[0, Mid] > SearchValue THEN\nRETURN BinarySearch(SearchArray, …………………………………, Mid – 1,\nSearchValue)\nELSE\nRETURN BinarySearch(SearchArray, Mid + 1, …………………………………,\nSearchValue)\nENDIF\nENDIF\nENDIF\nRETURN …………………………………\nENDFUNCTION\nNote: the arithmetic operator performs integer division, e.g. the result of will be .\nDIV 10 DIV 3 3\nWrite program code for the recursive function . (i)\nBinarySearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)(i)\n[8]\nIn the main program, test the function twice, outputting the returned (ii)\nBinarySearch()\nvalue each time.\nOne test should be for a number that is in the first line of the array.\nOne test should be for a number that is not in the first line of the array.\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 2(c)(ii)\n[2]\n© UCLES 2022 9618"
    },
    {
      "id": "9618-2022-mj-42-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 27,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_42.pdf?download=true",
      "source_pages": [
        7,
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p05.png",
        "9618-practical-programming/assets/9618-2022-mj-42-q03-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_42.pdf?download=true",
        "source_pages": [
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36
        ],
        "marks": 27
      },
      "text_excerpt": "A programmer is designing a computer game that uses a set of cards. 3\nEach card has a number and a colour. The cards are saved in the text file\nCardValues.txt\nThe program has a class named . The class has the following attributes and methods.\nCard\nCard\nThe number of the card Number : INTEGER\nThe colour of the card Colour : STRING\nTakes two values as parameters and sets them to the private Constructor()\nattributes\nReturns the number of the card GetNumber()\nReturns the colour of the card\nGetColour()\nThe constructor takes the number and colour of the card as parameters and sets them to the (a)\nprivate attributes.\nWrite program code to declare the class and its constructor. Do write any other not\nCard\nmethods.\nUse your programming language appropriate constructor.\nAll attributes should be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program as Question3_J22.\nCopy and paste the program code into in the evidence document. part 3(a)\n[5]\nThe two get methods return the associated attribute. (b)\nWrite program code for the get methods and .\nGetNumber() GetColour()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[3]\n[Turn over © UCLES 2022 9618/42/M/J/22\n8\nThe text file stores the data for 30 cards, in the order: number, colour. (c)\nCardValues.txt\nFor example, the first card in the text file:\nis the number\n1\nis the colour.\nred\nA 1D array of type is declared to store all the cards read in from\nCard CardValues.txt\nWrite the main program to:\n• declare an array of type with 30 elements\nCard\n• read in the data for the 30 cards from and assign each to the array.\nCardValues.txt\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[7]\nThe program needs to allow all players (maximum of 5) to select 4 cards from the 30 available. (d)\nA card can only be selected once, so the program needs to record which cards have already\nbeen selected.\nThe function, :\nChooseCard()\n• takes as input an integer to represent an array index from 1 to 30\n• validates that the value is between 1 and 30 inclusive\n• checks if the card is available (it has not already been selected)\n• loops until an available card is selected\n• returns the index of the card if it is available.\nAmend the program to store which cards have already been selected write program and\ncode for the function .\nChooseCard()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)\n[6]\nThe main program needs to allow one player to select all their 4 cards. (e)\nAmend the main program to: (i)\n• create an array, , for player 1 of type\nPlayer1 Card\n• ask player 1 to input 4 integers using the function from part 3(d)\n• store the cards in\nPlayer1\n• output the number and colour of the 4 cards in .\nPlayer1\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(e)(i)\n[5]\n© UCLES 2022 9618/42/M/J/22\n9\nTest your program with the followi"
    },
    {
      "id": "9618-2022-mj-43-q01",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q01-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q01-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18
        ],
        "marks": 29
      },
      "text_excerpt": "The text file stores the players who have scored the top ten scores in a game, 1\nHighScore.txt\nin descending order of score. The file stores the 3-character name of the player, and their integer\nscore, in the order: player, score.\nFor example, the current top player in the text file:\nis the player name\nFYI\nis the score\n10 000\nThe program:\n• reads in the data from\nHighScore.txt\n• allows the user to enter a new player name and their score\n• if appropriate, inserts the new player (name and score) into the top ten\n• writes the top ten players (name and score) into a new text file\nNewHighScore.txt\nThe program stores the players and their scores in an array of 11 elements (10 elements to (a)\nbe read from the file, 1 element to be inserted by the user).\nWrite a program to declare one or more arrays, as global data structures, to store the player\nnames and their scores.\nSave your program as Question1_J2022.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\nThe procedure opens the file and reads the data into (b)\nReadHighScores() HighScore.txt\nthe data structure(s) declared in 1(a). part\nWrite program code to declare the procedure .\nReadHighScores()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[6]\n© UCLES 2022 9618/43/M/J/22\n3\nThe procedure outputs all the values in the data structure(s) in the (c)\nOutputHighScores()\nformat:\nPlayerName Score\nFor example, the first two data items:\nFYI 10 000\nABC 9 092\nWrite program code to declare the procedure .\nOutputHighScores()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[3]\nThe main program should first call and then . (d)\nReadHighScores() OutputHighScores()\nWrite the program code for the main program. (i)\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[2]\nTest your program. (ii)\nTake a screenshot to show the output from 1(d)(i). part\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\nThe main program needs to ask the user to input a new player name and a score. If this score (e)\nis in the top ten then it will create a new top ten list that includes this score.\nAmend the main program to ask the user to input a 3-character player name and an (i)\ninteger score that must be between 1 and 100 000 inclusive.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)(i)\n[3]\nWrite program code to declare a procedure that: (ii)\n• takes the player name and score as parameters\n• creates a new top ten list that includes the parameter if appropriate.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)(ii)\n[5]\n[Turn over © UCLES 2022 9618/43/M/J/22\n4\nAmend the main program to call the procedure from 1(e)(ii). (iii) part\nOutput the contents of the array before inserting the new player name and score, and\noutput the contents of the array after inserting the new playe"
    },
    {
      "id": "9618-2022-mj-43-q02",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_43.pdf?download=true",
      "source_pages": [
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_43.pdf?download=true",
        "source_pages": [
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26
        ],
        "marks": 25
      },
      "text_excerpt": "A computer game is being developed using object-oriented programming. 2\nOne element of the game is a balloon. This is designed as the class .\nBalloon\nThe class has the following attributes and methods.\nBalloon\nThe health of the balloon Health : INTEGER\nThe colour of the balloon Colour : STRING\nThe item the balloon uses to defend itself DefenceItem : STRING\nInitialises the defence item and colour using the Constructor()\nparameters\nInitialises health to 100\nTakes the change as a parameter and adds this to the ChangeHealth()\nhealth\nReturns the defence item of the object GetDefenceItem()\nIf the health is 0 or less, it returns , otherwise it CheckHealth() TRUE\nreturns\nFALSE\nThe constructor takes the name of the defence item and the balloon’s colour as parameters (a)\nand sets these to the attributes. The health is initialised to .\n100\nWrite program code to declare the class and its constructor. Do not write any other\nBalloon\nmethods.\nUse your language appropriate constructor.\nAll attributes should be private. If you are writing in Python include attribute declarations using\ncomments.\nSave your program as Question2_J2022.\nCopy and paste the program code into in the evidence document. part 2(a)\n[5]\nThe get method returns the defence item of the object. (b)\nGetDefenceItem()\nAmend your program code to include the get method .\nGetDefenceItem()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[2]\n[Turn over © UCLES 2022 9618/43/M/J/22\n6\nThe object’s method takes an integer number as a parameter and adds (c)\nChangeHealth()\nthis to the health attribute of the object.\nAmend your program code to include the method .\nChangeHealth()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[2]\nThe object’s method returns if the health of the object is 0 or less (no (d)\nCheckHealth() TRUE\nhealth remaining) and returns otherwise (health remaining).\nFALSE\nAmend your program code to include the method .\nCheckHealth()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[2]\nAmend the main program to: (e)\n• take as input a defence item and colour from the user\n• create a new balloon with the identifier using the data input.\nBalloon1\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[3]\nThe function : (f)\nDefend()\n• takes a balloon object as a parameter\n• takes as input the strength of an opponent from the user\n• uses the method to subtract the strength input from the object’s\nChangeHealth()\nhealth\n• outputs the defence item of the balloon\n• checks the health of the object and outputs an appropriate message if it has no health\nremaining, or if it has health remaining\n• returns the amended balloon object.\nWrite program code to declare the function .\nDefend()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(f)\n[8]\n© UCLES 2022 9618/43/M/J/22\n7\nAmend the main program to call the "
    },
    {
      "id": "9618-2022-mj-43-q03",
      "subject": "9618",
      "year": 2022,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_qp_43.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-may-june/qp/9618_s22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-mj-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-mj-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-mj-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-may-june/ms/9618_s22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-May-June/9618_s22_ms_43.pdf?download=true",
        "source_pages": [
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34
        ],
        "marks": 21
      },
      "text_excerpt": "A program uses a circular queue to store strings. The queue is created as a 1D array, , 3\nQueueArray\nwith 10 string items.\nThe following data is stored about the queue:\n• the head pointer initialised to 0\n• the tail pointer initialised to 0\n• the number of items in the queue initialised to 0.\nDeclare the array, head pointer, tail pointer and number of items. (a)\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_J2022.\nCopy and paste the program code into in the evidence document. part 3(a)\n[2]\n© UCLES 2022 9618/43/M/J/22\n9\nThe function is written in pseudocode. The function adds to the queue. (b)\nEnqueue DataToAdd\nIt returns if the queue is full and returns if the item is added.\nFALSE TRUE\nThe function is incomplete, there are incomplete statements. five\nFUNCTION Enqueue(BYREF QueueArray[] : STRING, BYREF HeadPointer : INTEGER,\nBYREF TailPointer : INTEGER, NumberItems : INTEGER,\nDataToAdd : STRING) RETURNS BOOLEAN\n……………………………………\nIF NumberItems = THEN\n……………………………………\nRETURN\nENDIF\n…………………………………… ←\nDataToAdd QueueArray[ ]\nIF TailPointer >= 9 THEN\n…………………………………… ←\nTailPointer\nELSE\n←\nTailPointer + 1 TailPointer\nENDIF\n…………………………………… ←\nNumberItems NumberItems\nRETURN TRUE\nENDFUNCTION\nWrite program code for the function .\nEnqueue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[7]\nThe function returns if the queue is empty, or it returns the next data (c)\nDequeue() \"FALSE\"\nitem in the queue.\nWrite program code for the function .\nDequeue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[6]\n[Turn over © UCLES 2022 9618/43/M/J/22\n10\nAmend the main program to: (d) (i)\n• take as input 11 string values from the user\n• use the function to add each element to the queue\nEnqueue()\n• output an appropriate message to state whether each addition was successful, or\nnot\n• call function twice and output the return value each time.\nDequeue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)(i)\n[5]\nTest your program with the input data: (ii)\n\"A\" \"B\" \"C\" \"D\" \"E\" \"F\" \"G\" \"H\" \"I\" \"J\" \"K\"\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 3(d)(ii)\n[1]\n© UCLES 2022 9618/43/M/J/22\n11\nBLANK PAGE\n© UCLES 2022 9618/43/M/J/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is prod"
    },
    {
      "id": "9618-2022-on-31-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2022-on-31-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2022-on-31-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 9
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 8 bits for the mantissa\n• 8 bits for the exponent\n• two’s complement form for both mantissa and exponent.\nWrite the normalised floating-point representation of +202 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nWrite the normalised floating-point representation of –202 in this system. (b)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\n© UCLES 2022 9618/31/O/N/22\n3\nA binary number is stored in the computer system. (c)\nMantissa Exponent\n0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0\nState why the number is normalised. (i) not\n...........................................................................................................................................\n..................................................................................................................................... [1]\nWrite the normalised floating-point representation of the number. (ii)\nMantissa Exponent\n[2]"
    },
    {
      "id": "9618-2022-on-31-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-on-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 5
      },
      "text_excerpt": "Outline the functions of the Transport and Internet layers of the TCP/IP protocol suite. 2\nTransport layer .................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nInternet layer ....................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[5]\n[Turn over © UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-31-q03-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-on-31-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "State what is meant by the term type. 3 (a) enumerated data\n...................................................................................................................................................\n............................................................................................................................................. [1]\nState what is meant by the term type. (b) pointer data\n...................................................................................................................................................\n............................................................................................................................................. [1]\nThe months of the year are: January, February, March, April, May, June, July, August, (c)\nSeptember, October, November and December.\nWrite the statement to define the data type , to hold the names of the pseudocode\nQuarter1\nfirst three months of a year.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe composite data type is used to store data about the various pets of a group of (d)\nPet\nstudents. It uses these fields:\nField name Data type\nString PetName\nString AnimalType\nInteger PetAge\nChar PetGender\nString OwnerName\nWrite the statement to set up a variable for one record of the composite (i) pseudocode\ndata type .\nPet\n...........................................................................................................................................\n..................................................................................................................................... [1]\n© UCLES 2022 9618/31/O/N/22\n5\nWrite to store the details of the following pet, in the variable you set up in (ii) pseudocode\n(d)(i). part\nPetName AnimalType PetAge PetGender OwnerName\nTibbles Cat 8 M Jasmine Smith\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n........................................................................."
    },
    {
      "id": "9618-2022-on-31-q04",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "Draw line to connect each stage of compilation to its description. 4 one most appropriate\nStage of compilation Description\nminimising a program’s execution time and\nmemory requirement\nLexical analysis\nconverting an intermediate representation of\nsource code into an executable form\nSyntax analysis\nconverting a sequence of characters into a\nsequence of tokens\nCode generation\ndirectly executing instructions written in a\nscripting language\nOptimisation\nusing parsing algorithms to interpret the\nmeaning of a sequence of tokens\n[4]\n[Turn over © UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q05",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 3
      },
      "text_excerpt": "Write the infix expression in Reverse Polish Notation (RPN). 5 (a)\na * b + b - d + 15\n...................................................................................................................................................\n............................................................................................................................................. [1]\nWrite the RPN expression in infix form. (b) (i)\na b - c d + * a /\n...........................................................................................................................................\n..................................................................................................................................... [1]\nEvaluate your infix expression from when a = 5, b = 10, c = 27 and d = 12. (ii) part (b)(i)\n...........................................................................................................................................\n..................................................................................................................................... [1]"
    },
    {
      "id": "9618-2022-on-31-q06",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-on-31-q06-p01.png",
        "9618-topic-17-security/assets/9618-2022-on-31-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q06",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 8
      },
      "text_excerpt": "A message is encrypted using a private key and sent to an individual using asymmetric encryption. 6\nState what is meant by a key. (a) private\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDescribe the process of asymmetric encryption. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/31/O/N/22\n7\nExplain how a digital signature is used to verify a message when it is received. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2022-on-31-q07",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 7
      },
      "text_excerpt": "Complete the Karnaugh map (K-map) for the Boolean expression. 7 (a)\nA¯. C¯. D¯ A¯. C¯. C¯. D¯ C¯. B¯. C¯. D¯ B¯. C¯. Z = B. + B. D + A. B. + A. B. D + A. + A. D\nAB\n00 01 11 10\nCD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (b)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to as a simplified sum-of-products. (c) part (b)\nUse Boolean algebra to give your answer in its simplest form.\nSimplified sum-of-products\n= ............................................................................................................................................ Z\nSimplest form\n= ............................................................................................................................................ Z\n[3]\n[Turn over © UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q08",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 4
      },
      "text_excerpt": "Virtual memory, paging and segmentation are used in memory management. 8\nExplain what is meant by memory. (a) virtual\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nState difference between paging and segmentation in the way memory is divided. (b) one\n...................................................................................................................................................\n............................................................................................................................................. [1]"
    },
    {
      "id": "9618-2022-on-31-q09",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2022-on-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 4
      },
      "text_excerpt": "Deep learning is used in Artificial Intelligence (AI). 9\nDescribe what is meant by learning. (a) deep\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nOutline the reasons for using deep learning. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q10",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-31-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q10",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          11,
          12
        ],
        "marks": 6
      },
      "text_excerpt": "Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are 10\ntwo types of processor.\n3 Tick ( ) box in each row to show if the statement applies to RISC or CISC processors. (a) one\nStatement RISC CISC\nuses a smaller instruction set\nuses single-cycle instructions and limited addressing modes\nuses fewer general-purpose registers\nuses both hardwired and micro-coded control unit\nuses a system where cache is split between data and\ninstructions\n[2]\nDescribe the process of pipelining during the fetch-execute cycle in RISC processors. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q11",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-31-q11-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q11",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 8
      },
      "text_excerpt": "Define these Object-Oriented Programming (OOP) terms: 11 (a)\nInstance ....................................................................................................................................\n...................................................................................................................................................\nInheritance ................................................................................................................................\n...................................................................................................................................................\nPolymorphism ...........................................................................................................................\n...................................................................................................................................................\n[3]\nIn OOP, a class contains attributes and methods. (b)\nComplete the pseudocode for the class to enable objects to be created. The class needs\nCar\nto include:\n• string attributes to store the make, model, body type and fuel type\n• an integer attribute to store the number of cars of that type built.\nThe attributes must be available only through the methods of the class.\n.....................................\nCLASS\nPRIVATE Make : STRING\n................................................................\nPRIVATE\n................................................................................\n................................................................................\n................................................................................\n...................................................\nPUBLIC PROCEDURE New(CarMake : STRING, ,\n.....................................................\n)\n...................................... ←\nMake\n...................................... ←\nModel\n←\nCarBodyType BodyType\n←\n\"\" Fuel\n←\n0 NumberBuilt\nENDPROCEDURE\nGetFuel()\nGetNumberBuilt()\n.....................................\n[5]\n© UCLES 2022 9618/31/O/N/22"
    },
    {
      "id": "9618-2022-on-31-q12",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_31.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-31-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-31-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-31-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_31.pdf?download=true",
        "source_pages": [
          14,
          15
        ],
        "marks": 9
      },
      "text_excerpt": "The array is in alphabetical order. 12 (a)\nNames[0:99]\nComplete this pseudocode binary search algorithm.\n←\n0 Lower\n......................................................................................................\n←\nMid 0\n←\nExit FALSE\nOUTPUT \"Enter the name to be found \"\nINPUT Target\nREPEAT\n.......................................................................................................\nTHEN\nOUTPUT Target, \" does not exist\"\n←\nExit TRUE\nENDIF\n←\nMid Lower + (Upper – Lower + 1) DIV 2\nIF Names[Mid] < Target THEN\n..................................................................................................... ←\nLower\nENDIF\nIF Names[Mid] > Target THEN\n.....................................................................................................\nENDIF\n......................................................................................................\nTHEN\nOUTPUT Target, \" was found at location \", Mid\n←\nExit TRUE\nENDIF\n......................................................................................................\n[6]\nBig O notation is used to classify efficiency of algorithms. (b)\nThe Big O notation for time complexity in a binary search is O(log n).\nState the Big O notation for time complexity of a linear search. (i)\n..................................................................................................................................... [1]\nDescribe the meaning of O(log n) as it applies to a binary search algorithm. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n© UCLES 2022 9618/31/O/N/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinat"
    },
    {
      "id": "9618-2022-on-32-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2022-on-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Normalised floating-point numbers are stored in a computer system using two’s complement for 1\nboth the mantissa and the exponent with:\n• 11 bits for the mantissa\n• 5 bits for the exponent.\nWrite the largest positive two’s complement binary number that can be stored in this system. (a)\nMantissa Exponent\n[1]\nCalculate the denary value of the given binary floating-point number. (b)\nShow your working.\nMantissa Exponent\n1 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\nState when underflow occurs in a binary floating-point system. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q02",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          4,
          5
        ],
        "marks": 4
      },
      "text_excerpt": "Lexical analysis and syntax analysis are stages in the compilation of a program. 2\nIdentify stages that take place during the compilation of a program. (a) two other\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n[2]\nOutline the purpose of syntax analysis. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2022-on-32-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-on-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "Explain why a protocol is used in communication between computers. 3 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe TCP/IP protocol implementation can be viewed as a stack. (b)\nComplete the diagram for the TCP/IP protocol stack.\nTransport\nLink\n[2]\nDescribe the purpose of the IMAP protocol. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q04",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-32-q04-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-on-32-q04-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 10
      },
      "text_excerpt": "A program to manage regular flight details at an airport requires some user-defined data types. 4\nWrite statements to declare the enumerated data type to hold data (a) pseudocode\nAircraft\nabout the types of aircraft used for a flight.\nThese types of aircraft are: C300, C350, D242, E757, X380.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nWrite statements to declare the composite data type to hold data about (b) pseudocode\nFlight\nflights to a specific destination. These include:\n• flight number, which could be any combination of letters and numbers\n• destination\n• date of departure\n• type of aircraft used.\nUse the enumerated data type you created in (a). part\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\nWrite the statement to set up a variable for one record of the composite (c) (i) pseudocode\ndata type .\nFlight\n...........................................................................................................................................\n..................................................................................................................................... [1]\n© UCLES 2022 9618/32/O/N/22\n5\nWrite to store the details of the following flight in the variable you set up in (ii) pseudocode\n(c)(i). part\nField Data\nflight number XA782\ndestination Cambridge\ndate of departure 12/12/2"
    },
    {
      "id": "9618-2022-on-32-q05",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q05",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "Describe what is meant by a machine. 5 virtual\nInclude in your answer benefits and drawbacks of using a virtual machine. two two\nDescription .......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nBenefit 1 ...........................................................................................................................................\n..........................................................................................................................................................\nBenefit 2 ...........................................................................................................................................\n..........................................................................................................................................................\nDrawback 1 ......................................................................................................................................\n..........................................................................................................................................................\nDrawback 2 ......................................................................................................................................\n..........................................................................................................................................................\n[6]\n[Turn over © UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q06",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-on-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q06",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 6
      },
      "text_excerpt": "State differences between symmetric and asymmetric encryption. 6 (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain the process by which an organisation may acquire its digital certificate. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2022-on-32-q07",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2022-on-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q07",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 4
      },
      "text_excerpt": "Supervised and unsupervised learning are two categories of machine learning. 7\nDescribe supervised learning and unsupervised learning.\nSupervised learning .........................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nUnsupervised learning .....................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q08",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q08",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          10,
          11,
          12
        ],
        "marks": 8
      },
      "text_excerpt": "Draw a logic circuit for an SR flip-flop label the inputs. 8 (a) and\n.................\nQ\nQ¯\n.................\n[4]\nState the purpose of a flip-flop. (b)\n...................................................................................................................................................\n............................................................................................................................................. [1]\nSimplify the following expression using Boolean algebra, including De Morgan’s laws. (c)\nShow your working.\n(A.B).(A.C).(B.D)\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\n[Turn over © UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q09",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 9
      },
      "text_excerpt": "Explain the need for scheduling in process management. 9 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nDescribe these scheduling routines identify a benefit for each one. (b) and\nShortest job first ........................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nRound robin ..............................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nFirst come first served ..............................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[6]\n© UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q10",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-32-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q10",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          13,
          14
        ],
        "marks": 6
      },
      "text_excerpt": "Define these Object-Oriented Programming (OOP) terms: 10 (a)\nEncapsulation ...........................................................................................................................\n...................................................................................................................................................\nGetter ........................................................................................................................................\n...................................................................................................................................................\nSetter ........................................................................................................................................\n...................................................................................................................................................\n[3]\nA school has a program written using OOP to maintain its staff and student records. (b)\nThe object allows the details of the school’s substitute teachers to be\nSubstituteTeacher\nstored. This includes their full name, telephone number and whether or not they are in school\ntoday. For example:\nSarah Jones SubName\n01223658721 Telephone\nTRUE InSchool\nComplete the diagram for the object , including appropriate properties\nSubstituteTeacher\nand their getters and setters.\nSubstituteTeacher\nSubName : STRING\n....................................................................................................\nInSchool : BOOLEAN\n....................................................................................................\nSetTelephone(Tel : STRING)\n....................................................................................................\nGetSubName()\n....................................................................................................\n....................................................................................................\n[3]\n[Turn over © UCLES 2022 9618/32/O/N/22"
    },
    {
      "id": "9618-2022-on-32-q11",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-32-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-32-q11-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-32-q11-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-32-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_32.pdf?download=true",
        "source_pages": [
          15,
          16
        ],
        "marks": 10
      },
      "text_excerpt": "A simplified linked list is used to store the names of flowers in alphabetical order. It is implemented 11\nusing two 1D arrays:\n• stores the names of the flowers.\nFlower\n• stores the pointer to the next flower name in the list.\nNextPointer\nindicates the index of the first flower name in the linked list.\nHeadPointer\nHeadPointer 6\nWhen the end of the linked list is reached, the next pointer has the value of 0.\nThe following table shows the initial content of the arrays.\nIndex Flower NextPointer\n1 Rose 7\n2 Marigold 1\n3 Foxglove 10\n4 Iris 9\n5 Daisy 3\n6 Dahlia 5\n7 Saxifrage 0\n8 Lupin 2\n9 Lily 8\n10 Hydrangea 4\nSeveral flower names have been deleted from the linked list. These are crossed out in the (a)\nfollowing table.\nComplete the table to show the new values of and to keep the\nHeadPointer NextPointer\nremaining flower names in alphabetical order.\nHeadPointer\nIndex Flower NextPointer\n1 Rose\n2 Marigold\n3 Foxglove\n4 Iris\n5 Daisy\n6 Dahlia\n7 Saxifrage\n8 Lupin\n9 Lily\n10 Hydrangea\n[3]\n© UCLES 2022 9618/32/O/N/22\n11\nComplete the pseudocode algorithm so that it achieves the following when applied to the (b)\narrays:\n• The flower name is input.\n• The linked list is searched, in order, for the flower name.\n• If the flower name is found, an appropriate message is output to indicate it has been\nfound.\n• If the flower name is not found, an appropriate message is output to indicate it has not\nbeen found.\n• The algorithm terminates when the next pointer value is 0.\nHeadPointer Pointer\n0 Found\nOUTPUT \"Enter a flower name \"\n………………………………………………………………….\n………………………………………………………………….\nIF Flower[Pointer] = FlowerName THEN\nPointer Found\n0 Pointer\nELSE\n………………………………………………………………….\nENDIF\nENDWHILE\n………………………………………………………………….\nOUTPUT Flower[Found], \" is found\"\nELSE\n………………………………………………………………….\nENDIF\n[5]\nExplain how you could improve the simplified linked list structure. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/32/O/N/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reprodu"
    },
    {
      "id": "9618-2022-on-33-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2022-on-33-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2022-on-33-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 9
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 8 bits for the mantissa\n• 8 bits for the exponent\n• two’s complement form for both mantissa and exponent.\nWrite the normalised floating-point representation of +202 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nWrite the normalised floating-point representation of –202 in this system. (b)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\n© UCLES 2022 9618/33/O/N/22\n3\nA binary number is stored in the computer system. (c)\nMantissa Exponent\n0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0\nState why the number is normalised. (i) not\n...........................................................................................................................................\n..................................................................................................................................... [1]\nWrite the normalised floating-point representation of the number. (ii)\nMantissa Exponent\n[2]"
    },
    {
      "id": "9618-2022-on-33-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2022-on-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 5
      },
      "text_excerpt": "Outline the functions of the Transport and Internet layers of the TCP/IP protocol suite. 2\nTransport layer .................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nInternet layer ....................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[5]\n[Turn over © UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-33-q03-p01.png",
        "9618-topic-20-further-programming/assets/9618-2022-on-33-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "State what is meant by the term type. 3 (a) enumerated data\n...................................................................................................................................................\n............................................................................................................................................. [1]\nState what is meant by the term type. (b) pointer data\n...................................................................................................................................................\n............................................................................................................................................. [1]\nThe months of the year are: January, February, March, April, May, June, July, August, (c)\nSeptember, October, November and December.\nWrite the statement to define the data type , to hold the names of the pseudocode\nQuarter1\nfirst three months of a year.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe composite data type is used to store data about the various pets of a group of (d)\nPet\nstudents. It uses these fields:\nField name Data type\nString PetName\nString AnimalType\nInteger PetAge\nChar PetGender\nString OwnerName\nWrite the statement to set up a variable for one record of the composite (i) pseudocode\ndata type .\nPet\n...........................................................................................................................................\n..................................................................................................................................... [1]\n© UCLES 2022 9618/33/O/N/22\n5\nWrite to store the details of the following pet, in the variable you set up in (ii) pseudocode\n(d)(i). part\nPetName AnimalType PetAge PetGender OwnerName\nTibbles Cat 8 M Jasmine Smith\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n........................................................................."
    },
    {
      "id": "9618-2022-on-33-q04",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "Draw line to connect each stage of compilation to its description. 4 one most appropriate\nStage of compilation Description\nminimising a program’s execution time and\nmemory requirement\nLexical analysis\nconverting an intermediate representation of\nsource code into an executable form\nSyntax analysis\nconverting a sequence of characters into a\nsequence of tokens\nCode generation\ndirectly executing instructions written in a\nscripting language\nOptimisation\nusing parsing algorithms to interpret the\nmeaning of a sequence of tokens\n[4]\n[Turn over © UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q05",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 3
      },
      "text_excerpt": "Write the infix expression in Reverse Polish Notation (RPN). 5 (a)\na * b + b - d + 15\n...................................................................................................................................................\n............................................................................................................................................. [1]\nWrite the RPN expression in infix form. (b) (i)\na b - c d + * a /\n...........................................................................................................................................\n..................................................................................................................................... [1]\nEvaluate your infix expression from when a = 5, b = 10, c = 27 and d = 12. (ii) part (b)(i)\n...........................................................................................................................................\n..................................................................................................................................... [1]"
    },
    {
      "id": "9618-2022-on-33-q06",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2022-on-33-q06-p01.png",
        "9618-topic-17-security/assets/9618-2022-on-33-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q06",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 8
      },
      "text_excerpt": "A message is encrypted using a private key and sent to an individual using asymmetric encryption. 6\nState what is meant by a key. (a) private\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nDescribe the process of asymmetric encryption. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/33/O/N/22\n7\nExplain how a digital signature is used to verify a message when it is received. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2022-on-33-q07",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 7
      },
      "text_excerpt": "Complete the Karnaugh map (K-map) for the Boolean expression. 7 (a)\nA¯. C¯. D¯ A¯. C¯. C¯. D¯ C¯. B¯. C¯. D¯ B¯. C¯. Z = B. + B. D + A. B. + A. B. D + A. + A. D\nAB\n00 01 11 10\nCD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (b)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to as a simplified sum-of-products. (c) part (b)\nUse Boolean algebra to give your answer in its simplest form.\nSimplified sum-of-products\n= ............................................................................................................................................ Z\nSimplest form\n= ............................................................................................................................................ Z\n[3]\n[Turn over © UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q08",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2022-on-33-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 4
      },
      "text_excerpt": "Virtual memory, paging and segmentation are used in memory management. 8\nExplain what is meant by memory. (a) virtual\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nState difference between paging and segmentation in the way memory is divided. (b) one\n...................................................................................................................................................\n............................................................................................................................................. [1]"
    },
    {
      "id": "9618-2022-on-33-q09",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2022-on-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 4
      },
      "text_excerpt": "Deep learning is used in Artificial Intelligence (AI). 9\nDescribe what is meant by learning. (a) deep\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nOutline the reasons for using deep learning. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q10",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2022-on-33-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q10",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          11,
          12
        ],
        "marks": 6
      },
      "text_excerpt": "Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are 10\ntwo types of processor.\n3 Tick ( ) box in each row to show if the statement applies to RISC or CISC processors. (a) one\nStatement RISC CISC\nuses a smaller instruction set\nuses single-cycle instructions and limited addressing modes\nuses fewer general-purpose registers\nuses both hardwired and micro-coded control unit\nuses a system where cache is split between data and\ninstructions\n[2]\nDescribe the process of pipelining during the fetch-execute cycle in RISC processors. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q11",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2022-on-33-q11-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q11",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 8
      },
      "text_excerpt": "Define these Object-Oriented Programming (OOP) terms: 11 (a)\nInstance ....................................................................................................................................\n...................................................................................................................................................\nInheritance ................................................................................................................................\n...................................................................................................................................................\nPolymorphism ...........................................................................................................................\n...................................................................................................................................................\n[3]\nIn OOP, a class contains attributes and methods. (b)\nComplete the pseudocode for the class to enable objects to be created. The class needs\nCar\nto include:\n• string attributes to store the make, model, body type and fuel type\n• an integer attribute to store the number of cars of that type built.\nThe attributes must be available only through the methods of the class.\n.....................................\nCLASS\nPRIVATE Make : STRING\n................................................................\nPRIVATE\n................................................................................\n................................................................................\n................................................................................\n...................................................\nPUBLIC PROCEDURE New(CarMake : STRING, ,\n.....................................................\n)\n...................................... ←\nMake\n...................................... ←\nModel\n←\nCarBodyType BodyType\n←\n\"\" Fuel\n←\n0 NumberBuilt\nENDPROCEDURE\nGetFuel()\nGetNumberBuilt()\n.....................................\n[5]\n© UCLES 2022 9618/33/O/N/22"
    },
    {
      "id": "9618-2022-on-33-q12",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_33.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-33-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2022-on-33-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-33-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_33.pdf?download=true",
        "source_pages": [
          14,
          15
        ],
        "marks": 9
      },
      "text_excerpt": "The array is in alphabetical order. 12 (a)\nNames[0:99]\nComplete this pseudocode binary search algorithm.\n←\n0 Lower\n......................................................................................................\n←\nMid 0\n←\nExit FALSE\nOUTPUT \"Enter the name to be found \"\nINPUT Target\nREPEAT\n.......................................................................................................\nTHEN\nOUTPUT Target, \" does not exist\"\n←\nExit TRUE\nENDIF\n←\nMid Lower + (Upper – Lower + 1) DIV 2\nIF Names[Mid] < Target THEN\n..................................................................................................... ←\nLower\nENDIF\nIF Names[Mid] > Target THEN\n.....................................................................................................\nENDIF\n......................................................................................................\nTHEN\nOUTPUT Target, \" was found at location \", Mid\n←\nExit TRUE\nENDIF\n......................................................................................................\n[6]\nBig O notation is used to classify efficiency of algorithms. (b)\nThe Big O notation for time complexity in a binary search is O(log n).\nState the Big O notation for time complexity of a linear search. (i)\n..................................................................................................................................... [1]\nDescribe the meaning of O(log n) as it applies to a binary search algorithm. (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n© UCLES 2022 9618/33/O/N/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinat"
    },
    {
      "id": "9618-2022-on-41-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 23,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-on-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_41.pdf?download=true",
        "source_pages": [
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 23
      },
      "text_excerpt": "The text file stores 100 integer numbers between 1 and 100 inclusive. A 1\nIntegerData.txt\nprogram is required to read in this data and perform searching and sorting on the data.\nWrite program code to declare a global 1D array, , with space for 100 integer (a)\nDataArray\nvalues.\nSave your program as Question1_N22.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\nThe procedure must read in the numbers from the text file and store each one (b)\nReadFile()\nin the array. Use appropriate exception handling.\nWrite program code for the procedure .\nReadFile()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[6]\nThe function asks the user to enter a number to search for in the array. (c)\nFindValues()\nThe number input must be a whole number between 1 and 100 inclusive. The function then\nreturns the number of times the number input appears in the array.\nWrite program code for the function .\nFindValues()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[7]\n© UCLES 2022 9618/41/O/N/22\n3\nWrite program code to call and from the main program. (d) (i)\nReadFile() FindValues()\nThe return value from must be output with an appropriate message.\nFindValues()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[3]\nTest your program using the number 61 as input. (ii)\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\nThe procedure needs to perform a bubble sort on the array and print the (e)\nBubbleSort()\ncontents of the sorted array.\nWrite program code for the procedure call it from the main program. and\nBubbleSort()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)\n[4]\n[Turn over © UCLES 2022 9618/41/O/N/22"
    },
    {
      "id": "9618-2022-on-41-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-on-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-on-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2022-on-41-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_41.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "marks": 31
      },
      "text_excerpt": "A computer program is being developed that uses a set of cards. The program is written using 2\nobject-oriented programming.\nThe program has two classes: and .\nCard Hand\nThe methods and attributes of these classes are shown:\nCard\nstores the card number from 1 to 5 inclusive\nNumber : INTEGER\nstores the card colour: red, blue or yellow\nColour : STRING\ntakes a number and colour as parameters and sets\nConstructor()\nthe private values to these parameters\nreturns the card number\nGetNumber()\nreturns the card colour\nGetColour()\nHand\n1D array of type\nCards : ARRAY[0:9] OF Card Card\nstores the position of the first card in the hand\nFirstCard : INTEGER\nstores the number of cards in the hand\nNumberCards : INTEGER\ntakes five card objects as parameters, assigns each\nConstructor()\ncard to the array , initialises to 0\nCards[] FirstCard\nand to 5\nNumberCards\ntakes an index as a parameter and returns the card at\nGetCard()\nthat index in the array\nWrite program code to declare the class , its attributes and constructor. (a) (i)\nCard\nDo write program code for the get methods. not\nUse your programming language appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program as Question2_N22.\nCopy and paste the program code into in the evidence document. part 2(a)(i)\n[5]\nWrite program code for the class methods and . (ii)\nGetNumber() GetColour()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(ii)\n[3]\n© UCLES 2022 9618/41/O/N/22\n5\nThe program is tested with the following cards: (iii)\nNumber Colour\n1 red\n2 red\n3 red\n4 red\n5 red\n1 blue\n2 blue\n3 blue\n4 blue\n5 blue\n1 yellow\n2 yellow\n3 yellow\n4 yellow\n5 yellow\nWrite program code to declare each of these cards as a variable of type in the\nCard\nmain program.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iii)\n[2]\n[Turn over © UCLES 2022 9618/41/O/N/22\n6\nWrite program code to declare the class , its attributes and constructor. (b) (i)\nHand\nDo write the get methods. not\nUse your programming language appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[6]\nThe get method takes an index as a parameter and returns the card stored (ii)\nGetCard()\nat that index in the array.\nWrite program code for the method .\nGetCard()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[2]\nTwo players are declared with 5 cards each. (iii)\nPlayer 1 has the cards: 1 red, 2 red, 3 red, 4 red, 1 yellow.\nPlayer 2 has the cards: 2 yellow, 3 yellow, 4 yellow, 5 yellow, 1 blue.\nWrite program code to declare player 1 and player 2 as objects of type , with the\nHand\ncards indicated.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)("
    },
    {
      "id": "9618-2022-on-41-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-on-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-on-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-on-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-on-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_41.pdf?download=true",
        "source_pages": [
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23
        ],
        "marks": 21
      },
      "text_excerpt": "A binary tree consists of nodes. Each node has 3 integer values: a left pointer, data and a right 3\npointer.\nThe binary tree is stored using a global 2D array.\nThe pseudocode declaration for the array is:\nDECLARE ArrayNodes : ARRAY[0:19, 0:2] OF INTEGER\nFor example:\n• stores the left pointer for the first node.\nArrayNodes[0, 0]\n• stores the data for the first node.\nArrayNodes[0, 1]\n• stores the right pointer for the first node.\nArrayNodes[0, 2]\nindicates a null pointer, or null data.\n–1\nWrite program code to: (a)\n• declare the global 2D array\nArrayNodes\n• initialise all 3 integer values to for each node.\n–1\nSave your program as Question3_N22.\nCopy and paste the program code into in the evidence document. part 3(a)\n[3]\nThe binary tree stores the following values: (b)\nIndex Left pointer Data Right pointer\n0 1 20 5\n1 2 15 –1\n2 –1 3 3\n3 –1 9 4\n4 –1 10 –1\n5 –1 58 –1\n6 –1 –1 –1\nstores the index of the first free element in the array, initialised to 6.\nFreeNode\nstores the index of the first node in the tree, initialised to 0.\nRootPointer\nAmend your program by writing program code to store the given data in and\nArrayNodes\ninitialise the free node and root node pointers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[2]\n© UCLES 2022 9618/41/O/N/22\n9\nThe following recursive pseudocode function searches the binary tree for a given value. If the (c)\nvalue is found, the function must return the index of the value. If the value is not found, the\nfunction must return –1.\nThe function is incomplete. There are incomplete statements. four\nFUNCTION SearchValue(Root : INTEGER,\nValueToFind : INTEGER) RETURNS INTEGER\nIF Root = –1 THEN\nRETURN –1\nELSE\nIF ArrayNodes[Root, 1] = ValueToFind THEN\n.......................................\nRETURN\nELSE\nIF ArrayNodes[Root, 1] = –1 THEN\nRETURN –1\nENDIF\nENDIF\nENDIF\n.......................................\nIF ArrayNodes[Root, 1] ValueToFind THEN\n............\nRETURN SearchValue(ArrayNodes[ , 0], ValueToFind)\nENDIF\n............\nIF ArrayNodes[Root, ] < ValueToFind THEN\nRETURN SearchValue(ArrayNodes[Root, 2], ValueToFind)\nENDIF\nENDFUNCTION\nWrite program code for the function .\nSearchValue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[5]\n[Turn over © UCLES 2022 9618/41/O/N/22\n10\nA post order traversal performs the following operation: (d)\n• visit the left node\n• visit the right node\n• output the root.\nFor example, in the following tree, the output would be: 3 9 25 60 50\n50\n25 60\n3 9\nAn outline of the procedure is:\nPostOrder()\n• If left node is not empty, make a recursive call with the left node as the root.\n• If right node is not empty, make a recursive call with the right node as the root.\n• Output the current root node.\nThe procedure takes the root node as a parameter.\nPostOrder()\nWrite program code for the procedure .\nPostOrder()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)\n[7]\n© UCLES 2022 9618/"
    },
    {
      "id": "9618-2022-on-42-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 23,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-on-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2022-on-42-q01-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_42.pdf?download=true",
        "source_pages": [
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "marks": 23
      },
      "text_excerpt": "A computer program is needed to store jobs in order of priority. Each job has a job number 1\n(for example, 123) and a priority from 1 to 10, with 1 being the highest priority and 10 the lowest.\nThe program stores the jobs in a global 2D array.\nThe pseudocode declaration for the array is:\nDECLARE Jobs : ARRAY[0:99, 0:1] OF INTEGER\nFor example:\n• stores the job number of the first job.\nJobs[0, 0]\n• stores the priority of the first job.\nJobs[0, 1]\nThe global variable, , stores the number of jobs currently in the array.\nNumberOfJobs\nWrite program code to declare the global 2D array and the global variable (a)\nJobs\n.\nNumberOfJobs\nSave your program as Question1_N22.\nCopy and paste the program code into in the evidence document. part 1(a)\n[3]\nThe procedure stores in each of the array elements and assigns to (b)\nInitialise() –1 0\n.\nNumberOfJobs\nWrite program code for the procedure .\nInitialise()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[3]\n© UCLES 2022 9618/42/O/N/22\n3\nThe procedure : (c)\nAddJob()\n• takes a job number and priority as parameters\n• stores the job in the next free array element\n• outputs ‘Added’ if the job was successfully stored in the array\n• outputs ‘Not added’ if the job was not successfully stored in the array.\nWrite program code for the procedure .\nAddJob()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[5]\nThe main program should call the procedure and then use the (d)\nInitialise() AddJob()\nprocedure to store the following jobs in the order given:\nJob number Priority\n12 10\n526 9\n33 8\n12 9\n78 1\nWrite program code for the main program and perform the tasks described.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)\n[2]\nWhen a new job has been added, the array is sorted into ascending numerical order of priority (e)\nusing an insertion sort.\nWrite program code for the procedure to sort the data into ascending\nInsertionSort()\nnumerical order of priority.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)\n[5]\n[Turn over © UCLES 2022 9618/42/O/N/22\n4\nThe procedure outputs each job number and priority on a line, for example: (f)\nPrintArray()\n123 priority 1\n39 priority 3\n120 priority 7\nWrite program code for the procedure .\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(f)\n[3]\nThe main program needs to sort the array and then output the contents of the array. (g)\nAmend the main program by writing program code to call procedures (i)\nInsertionSort()\nand .\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(g)(i)\n[1]\nTest your program. (ii)\nTake a screenshot of the output.\nCopy and paste the screenshot into in the evidence document. part 1(g)(ii)\n[1]\n© UCLES 2022 9618/42/O/N/22"
    },
    {
      "id": "9618-2022-on-42-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_42.pdf?download=true",
      "source_pages": [
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-on-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-on-42-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_42.pdf?download=true",
        "source_pages": [
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20
        ],
        "marks": 31
      },
      "text_excerpt": "A computer game is being developed. The game has 10 different characters that are all active in 2\nthe game.\nPart of the game is being written using object-oriented programming.\nThe class stores data about the characters. Each character has a name and the x\nCharacter\ncoordinate and y coordinate of their current position.\nCharacter\nstores the name of the character Name : STRING\nstores the x coordinate XCoordinate : INTEGER\nstores the y coordinate YCoordinate : INTEGER\ninitialises , and from the Constructor() Name XCoordinate YCoordinate\nvalues passed as parameters\nreturns the name of the character GetName()\nreturns the x coordinate of the character GetX()\nreturns the y coordinate of the character GetY()\ntakes as an integer parameter and adds it to the ChangePosition() XChange\nx coordinate\ntakes as an integer parameter and adds it to the\nYChange\ny coordinate\nWrite program code to declare the class and its constructor. Do write (a) not\nCharacter\nprogram code for the other methods.\nUse your programming language appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations using\ncomments.\nSave your program as Question2_N22.\nCopy and paste the program code into in the evidence document. part 2(a)\n[4]\nWrite program code for the get methods for the class . (b) three\nCharacter\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[3]\n[Turn over © UCLES 2022 9618/42/O/N/22\n6\nWrite program code for the method . (c)\nChangePosition()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[2]\nThe main program has a 1D array of characters. Each character is stored as an object of type (d)\n.\nCharacter\nThe game has a maximum of 10 characters. The character names, x coordinates and y\ncoordinates are stored in the file in the order:\nCharacters.txt\n• name\n• x coordinate\n• y coordinate.\nFor example, the first character in the file is named Amal, with the x coordinate 0 and the y\ncoordinate 2.\nAmend the main program by writing program code to:\n• declare the array\n• read in all 10 characters from\nCharacters.txt\n• store each character as an object in the array.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[7]\nThe main program needs to read in a character’s name from the user, search for the character (e)\nin the array and store the index of its position. It repeats until the user enters a name that\nexists in the array.\nAmend the main program by writing program code to perform this task.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[5]\n© UCLES 2022 9618/42/O/N/22\n7\nThe user will enter a letter to identify the direction the chosen character from should (f) part 2(e)\nmove.\n• If ‘A’ is input, the character moves left (x coordinate minus 1).\n• If ‘W’ is input, the character moves up (y coordinate plus 1).\n• If ‘S’ is input, the character moves down (y coor"
    },
    {
      "id": "9618-2022-on-42-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_42.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-on-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-on-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-on-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-on-42-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_42.pdf?download=true",
        "source_pages": [
          20,
          21,
          22,
          23,
          24
        ],
        "marks": 21
      },
      "text_excerpt": "A program uses a linear queue to store up to 100 integers. 3\nA 1D array, , is used to store the data. The head pointer points to the first number (a)\nQueue\nstored in the queue and the tail pointer points to the next free space in the queue.\nWrite program code to:\n• declare the global array\nQueue\n• declare the global variable head pointer and assign an appropriate initial value\n• declare the global variable tail pointer and assign an appropriate initial value.\nSave your program as Question3_N22.\nCopy and paste the program code into in the evidence document. part 3(a)\n[3]\nThe function takes an integer value as a parameter and stores it in the queue. It (b)\nEnqueue()\nreturns if the value was successfully stored and otherwise.\nTRUE FALSE\nWrite program code for the function .\nEnqueue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[6]\nThe main program uses the function to store the numbers 1 to 20 (inclusive) (c)\nEnqueue()\nin the queue, in ascending numerical order. The program should output ‘Successful’ if all\nnumbers are successfully enqueued, and ‘Unsuccessful’ otherwise.\nAmend the main program by writing program code to perform this task.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[4]\n© UCLES 2022 9618/42/O/N/22\n9\nThe following iterative pseudocode function calculates the total of all the values stored in the (d)\nqueue.\nFUNCTION IterativeOutput(Start: INTEGER) RETURNS INTEGER\nDECLARE Total : INTEGER\n←\n0 Total\n←\nStart - 1 TO HeadPointer STEP -1 FOR Count\n←\nTotal + Queue[Count] Total\nNEXT Count\nRETURN Total\nENDFUNCTION\nRewrite the function as a recursive function using program code.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)\n[6]\nThe main program calls the recursive function from and outputs the value returned. (e) part 3(d)\nAmend the main program by writing program code to perform this task. (i)\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(e)(i)\n[1]\nTest your program. (ii)\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 3(e)(ii)\n[1]\n© UCLES 2022 9618/42/O/N/22\n10\nBLANK PAGE\n© UCLES 2022 9618/42/O/N/22\n11\nBLANK PAGE\n© UCLES 2022 9618/42/O/N/22\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely"
    },
    {
      "id": "9618-2022-on-43-q01",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 23,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2022-on-43-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_43.pdf?download=true",
        "source_pages": [
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 23
      },
      "text_excerpt": "The text file stores 100 integer numbers between 1 and 100 inclusive. A 1\nIntegerData.txt\nprogram is required to read in this data and perform searching and sorting on the data.\nWrite program code to declare a global 1D array, , with space for 100 integer (a)\nDataArray\nvalues.\nSave your program as Question1_N22.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\nThe procedure must read in the numbers from the text file and store each one (b)\nReadFile()\nin the array. Use appropriate exception handling.\nWrite program code for the procedure .\nReadFile()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[6]\nThe function asks the user to enter a number to search for in the array. (c)\nFindValues()\nThe number input must be a whole number between 1 and 100 inclusive. The function then\nreturns the number of times the number input appears in the array.\nWrite program code for the function .\nFindValues()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[7]\n© UCLES 2022 9618/43/O/N/22\n3\nWrite program code to call and from the main program. (d) (i)\nReadFile() FindValues()\nThe return value from must be output with an appropriate message.\nFindValues()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[3]\nTest your program using the number 61 as input. (ii)\nTake a screenshot to show the output.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\nThe procedure needs to perform a bubble sort on the array and print the (e)\nBubbleSort()\ncontents of the sorted array.\nWrite program code for the procedure call it from the main program. and\nBubbleSort()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(e)\n[4]\n[Turn over © UCLES 2022 9618/43/O/N/22"
    },
    {
      "id": "9618-2022-on-43-q02",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_43.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2022-on-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2022-on-43-q02-p03.png",
        "9618-practical-programming/assets/9618-2022-on-43-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_43.pdf?download=true",
        "source_pages": [
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15
        ],
        "marks": 31
      },
      "text_excerpt": "A computer program is being developed that uses a set of cards. The program is written using 2\nobject-oriented programming.\nThe program has two classes: and .\nCard Hand\nThe methods and attributes of these classes are shown:\nCard\nstores the card number from 1 to 5 inclusive\nNumber : INTEGER\nstores the card colour: red, blue or yellow\nColour : STRING\ntakes a number and colour as parameters and sets\nConstructor()\nthe private values to these parameters\nreturns the card number\nGetNumber()\nreturns the card colour\nGetColour()\nHand\n1D array of type\nCards : ARRAY[0:9] OF Card Card\nstores the position of the first card in the hand\nFirstCard : INTEGER\nstores the number of cards in the hand\nNumberCards : INTEGER\ntakes five card objects as parameters, assigns each\nConstructor()\ncard to the array , initialises to 0\nCards[] FirstCard\nand to 5\nNumberCards\ntakes an index as a parameter and returns the card at\nGetCard()\nthat index in the array\nWrite program code to declare the class , its attributes and constructor. (a) (i)\nCard\nDo write program code for the get methods. not\nUse your programming language appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program as Question2_N22.\nCopy and paste the program code into in the evidence document. part 2(a)(i)\n[5]\nWrite program code for the class methods and . (ii)\nGetNumber() GetColour()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(ii)\n[3]\n© UCLES 2022 9618/43/O/N/22\n5\nThe program is tested with the following cards: (iii)\nNumber Colour\n1 red\n2 red\n3 red\n4 red\n5 red\n1 blue\n2 blue\n3 blue\n4 blue\n5 blue\n1 yellow\n2 yellow\n3 yellow\n4 yellow\n5 yellow\nWrite program code to declare each of these cards as a variable of type in the\nCard\nmain program.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iii)\n[2]\n[Turn over © UCLES 2022 9618/43/O/N/22\n6\nWrite program code to declare the class , its attributes and constructor. (b) (i)\nHand\nDo write the get methods. not\nUse your programming language appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(i)\n[6]\nThe get method takes an index as a parameter and returns the card stored (ii)\nGetCard()\nat that index in the array.\nWrite program code for the method .\nGetCard()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)(ii)\n[2]\nTwo players are declared with 5 cards each. (iii)\nPlayer 1 has the cards: 1 red, 2 red, 3 red, 4 red, 1 yellow.\nPlayer 2 has the cards: 2 yellow, 3 yellow, 4 yellow, 5 yellow, 1 blue.\nWrite program code to declare player 1 and player 2 as objects of type , with the\nHand\ncards indicated.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)("
    },
    {
      "id": "9618-2022-on-43-q03",
      "subject": "9618",
      "year": 2022,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_qp_43.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2022-oct-nov/qp/9618_w22_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2022-on-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2022-on-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2022-on-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2022-on-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2022-on-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2022-on-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2022-oct-nov/ms/9618_w22_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2022-Oct-Nov/9618_w22_ms_43.pdf?download=true",
        "source_pages": [
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23
        ],
        "marks": 21
      },
      "text_excerpt": "A binary tree consists of nodes. Each node has 3 integer values: a left pointer, data and a right 3\npointer.\nThe binary tree is stored using a global 2D array.\nThe pseudocode declaration for the array is:\nDECLARE ArrayNodes : ARRAY[0:19, 0:2] OF INTEGER\nFor example:\n• stores the left pointer for the first node.\nArrayNodes[0, 0]\n• stores the data for the first node.\nArrayNodes[0, 1]\n• stores the right pointer for the first node.\nArrayNodes[0, 2]\nindicates a null pointer, or null data.\n–1\nWrite program code to: (a)\n• declare the global 2D array\nArrayNodes\n• initialise all 3 integer values to for each node.\n–1\nSave your program as Question3_N22.\nCopy and paste the program code into in the evidence document. part 3(a)\n[3]\nThe binary tree stores the following values: (b)\nIndex Left pointer Data Right pointer\n0 1 20 5\n1 2 15 –1\n2 –1 3 3\n3 –1 9 4\n4 –1 10 –1\n5 –1 58 –1\n6 –1 –1 –1\nstores the index of the first free element in the array, initialised to 6.\nFreeNode\nstores the index of the first node in the tree, initialised to 0.\nRootPointer\nAmend your program by writing program code to store the given data in and\nArrayNodes\ninitialise the free node and root node pointers.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)\n[2]\n© UCLES 2022 9618/43/O/N/22\n9\nThe following recursive pseudocode function searches the binary tree for a given value. If the (c)\nvalue is found, the function must return the index of the value. If the value is not found, the\nfunction must return –1.\nThe function is incomplete. There are incomplete statements. four\nFUNCTION SearchValue(Root : INTEGER,\nValueToFind : INTEGER) RETURNS INTEGER\nIF Root = –1 THEN\nRETURN –1\nELSE\nIF ArrayNodes[Root, 1] = ValueToFind THEN\n.......................................\nRETURN\nELSE\nIF ArrayNodes[Root, 1] = –1 THEN\nRETURN –1\nENDIF\nENDIF\nENDIF\n.......................................\nIF ArrayNodes[Root, 1] ValueToFind THEN\n............\nRETURN SearchValue(ArrayNodes[ , 0], ValueToFind)\nENDIF\n............\nIF ArrayNodes[Root, ] < ValueToFind THEN\nRETURN SearchValue(ArrayNodes[Root, 2], ValueToFind)\nENDIF\nENDFUNCTION\nWrite program code for the function .\nSearchValue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(c)\n[5]\n[Turn over © UCLES 2022 9618/43/O/N/22\n10\nA post order traversal performs the following operation: (d)\n• visit the left node\n• visit the right node\n• output the root.\nFor example, in the following tree, the output would be: 3 9 25 60 50\n50\n25 60\n3 9\nAn outline of the procedure is:\nPostOrder()\n• If left node is not empty, make a recursive call with the left node as the root.\n• If right node is not empty, make a recursive call with the right node as the root.\n• Output the current root node.\nThe procedure takes the root node as a parameter.\nPostOrder()\nWrite program code for the procedure .\nPostOrder()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(d)\n[7]\n© UCLES 2022 9618/"
    },
    {
      "id": "9618-2023-mj-31-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-mj-31-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2023-mj-31-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 6
      },
      "text_excerpt": "Numbers are stored in two different computer systems by using floating-point representation. 1\nuses: System 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nuses: System 2\n• 8 bits for the mantissa\n• 8 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nCalculate the normalised floating-point representation of 113.75 show how it would be (a) and\nrepresented in each of these two systems.\nShow your working.\nSystem 1\nMantissa Exponent\nSystem 2\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\n© UCLES 2023 9618/31/M/J/23\n3\nExplain the problem that occurred in when representing the number in 2. (b) part (a) system\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-mj-31-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2023-mj-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q02",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Draw line from each machine learning category to its description. 2 (a) one most appropriate\nMachine learning category Description\nsimulates the data-processing\ncapabilities of the human brain to\nmake decisions\nSupervised\nlearning\nenables learning by mapping an input\nto an output based on example input–\noutput pairs\nReinforcement\nlearning\nenables information related to errors\nproduced by the neural network to be\ntransmitted\nDeep\nlearning\nenables learning in an interactive\nenvironment by trial and error using\nits own experiences\nUnsupervised\nlearning\nenables learning by allowing the\nprocess to discover patterns on its\nown that were previously undetected\n[4]\nDescribe the purpose of both the A* algorithm and Dijkstra’s algorithm. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q03",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "A hashing algorithm is used to calculate storage locations for records in a random access file. 3 (a)\nIt calculates hash values by using the function modulus 3.\nThe function modulus gives the remainder after integer division.\nFor example, 1030 modulus 3 = 1. Therefore, the record key 1030 gives a hash value of 1.\nComplete the table to show the remaining hash values.\nRecord key Hash value\n1030 1\n1050\n1025\n[2]\nDescribe what happens, in relation to the storage or retrieval of a record in the file, when (b)\nthe calculated hash value is a duplicate of a previously calculated hash value for a different\nrecord key.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n© UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q04",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-mj-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Two descriptions of user-defined data types are given. 4\nGive appropriate type declaration statements for each, including appropriate names.\nA data type to hold a set of prime numbers below 20. These prime numbers are: (a)\n2, 3, 5, 7, 11, 13, 17, 19\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nA data type to point to a day in the week, for example Monday. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-mj-31-q05",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-mj-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q05",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "State, with a reason, where it would be appropriate to use circuit switching. 5 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nGive benefits and drawbacks of circuit switching. (b) two two\nBenefit 1 ...................................................................................................................................\n...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\n...................................................................................................................................................\nDrawback 1 ...............................................................................................................................\n...................................................................................................................................................\nDrawback 2 ...............................................................................................................................\n...................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q06",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-mj-31-q06-p01.png",
        "9618-topic-16-system-software/assets/9618-2023-mj-31-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q06",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Several syntax diagrams are shown. 6\ndigit operator\n0 +\n1 –\n2 *\n3 /\nsymbol\n4\n$\n5\n%\n6\n&\n7\n@\n8\n#\nletter\n9\nA\nD\nP\nR\nY\npassword\nletter digit symbol\n© UCLES 2023 9618/31/M/J/23\n7\nState whether each of the following passwords is valid or invalid and give a reason for your (a)\nchoice.\n...................................................................................................................................\nDPAD99$\nReason .....................................................................................................................................\n...................................................................................................................................................\n.....................................................................................................................................\nDAD#95\nReason .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................\nADY123?\nReason .....................................................................................................................................\n...................................................................................................................................................\n[3]\nComplete the Backus-Naur Form (BNF) for the syntax diagrams shown. (b)\n........................................................................................................................\n<symbol> ::=\n...................................................................................................................................................\n........................................................................................................................\n<letter> ::=\n...................................................................................................................................................\n[1]\nAn identifier begins with one or more letters, followed by zero digits or one digit or more (c)\ndigits.\nValid letters and digits are shown in the syntax diagrams on page 6.\nDraw a syntax diagram for an identifier.\n[4]\n[Turn over © UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q07",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-mj-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 7
      },
      "text_excerpt": "Complete the Karnaugh map (K-map) for the following Boolean expression. 7 (a)\nA.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D Z =\nAB\n00 01 11 10 CD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (b)\nsum-of-products. [2]\nWrite the Boolean logic expression from your answer to as a simplified (c) part (b)\nsum-of-products.\n............................................................................................................................................ Z =\n............................................................................................................................................. [2]\nUse Boolean algebra to give your answer to in its simplest form. (d) part (c)\n...................................................................................................................................... [1] Z =\n© UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q08",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-mj-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q08",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 3
      },
      "text_excerpt": "Outline the characteristics of massively parallel computers. 8\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [3]"
    },
    {
      "id": "9618-2023-mj-31-q09",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2023-mj-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q09",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "Encryption is used to alter data into a form that makes it meaningless if intercepted. 9 (a)\nDescribe the purpose of asymmetric key cryptography.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nIdentify benefits and drawbacks of quantum cryptography. (b) two two\nBenefit 1 ...................................................................................................................................\n...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\n...................................................................................................................................................\nDrawback 1 ...............................................................................................................................\n...................................................................................................................................................\nDrawback 2 ...............................................................................................................................\n...................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-31-q10",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 5
      },
      "text_excerpt": "The pseudocode algorithm shown copies an active accounts text file to an 10\nActiveFile.txt\narchive accounts text file , one line at a time. Any blank lines found in the\nArchiveFile.txt\nactive accounts text file are replaced with the words in the archive\n\"Account not present\"\naccounts text file.\nComplete this file-handling pseudocode.\nDECLARE Account : STRING\n..........................................................................................................................................................\nOPENFILE \"ArchiveFile.txt\" FOR WRITE\n......................................................................................................................................\nWHILE NOT\nREADFILE \"ActiveFile.txt\", Account\nIF Account = \"\" THEN\n..........................................................................\nWRITEFILE \"ArchiveFile.txt\", \" \"\nELSE\n...............................................................................\nWRITEFILE \"ArchiveFile.txt\",\nENDIF\nENDWHILE\n..........................................................................................................................................................\nCLOSEFILE \"ArchiveFile.txt\"\n[5]"
    },
    {
      "id": "9618-2023-mj-31-q11",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 11
      },
      "text_excerpt": "Pseudocode is to be written to implement a queue Abstract Data Type (ADT) with items of the 11\nstring data type. This will be implemented using the information in the table.\nIdentifier Data type Description\npoints to the start of the queue\nFrontPointer INTEGER\npoints to the end of the queue\nRearPointer INTEGER\nthe current size of the queue\nLength INTEGER\n1D array to implement the queue\nQueue STRING\nA constant, with identifier , limits the size of the queue to 60 items.\nMaxSize\nWrite the pseudocode to declare , , , and (a)\nMaxSize FrontPointer RearPointer Length\n.\nQueue\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/31/M/J/23\n11\nComplete the following pseudocode for the function to remove the front item from (b)\nDequeue\nthe queue.\nFUNCTION Dequeue RETURNS STRING\nDECLARE Item : STRING\n.........................................................................................................................\n> 0 THEN\n.......................................................................................................................\nItem ←\n......................................................................................................................................\nIF Length = 0 THEN\nCALL Initialise // reset the pointers\nELSE\nIF FrontPointer > MaxSize THEN\n.......................................................................................................................\n← 1\nENDIF\nENDIF\nELSE\nOUTPUT \"The print queue was empty – error!\"\nItem ← \"\"\nENDIF\nRETURN Item\nENDFUNCTION\n[4]\nExplain how a new element can be added to the queue if it is implemented using two stacks. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n..............................................................................................."
    },
    {
      "id": "9618-2023-mj-31-q12",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_31.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-31-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-31-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 7
      },
      "text_excerpt": "Describe what is meant by recursion. 12 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/31/M/J/23\n12\nA Fibonacci sequence is a series of numbers formed by adding together the two preceding (b)\nnumbers, for example:\n0, 1, 1, 2, …\nThis function calculates and returns values in the Fibonacci sequence and uses recursion.\nFUNCTION Fib(Number : INTEGER) RETURNS INTEGER\nIF Number <= 1 THEN\nResult ← Number\nELSE\nResult ← Fib(Number – 1) + Fib(Number – 2)\nENDIF\nRETURN Result\nENDFUNCTION\nComplete the trace table for the function when it is called as .\nFib(5)\nCall number Function call Number Result Return value\n5\n[5]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2023 9618/31/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-mj-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 5
      },
      "text_excerpt": "Numbers are stored in a computer using floating point representation with: 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nWrite the normalised floating‑point representation of the following binary number using this (a)\nsystem:\n0101010.111\nShow your working.\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nMantissa Exponent\n[2]\nDescribe the reason why the normalised form of the following binary number cannot be (b)\nrepresented accurately using this system.\n0101011.111001\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q02",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 5
      },
      "text_excerpt": "Describe how records are organised and accessed in a sequential file. 2 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nA hashing algorithm is used to calculate storage locations for records in a random access file. (b)\nThe algorithm calculates hash values using the function modulus 5.\nThe function modulus gives the remainder after integer division.\nFor example, 3003 modulus 5 = 3, so the record key 3003 gives a hash value of 3.\nComplete the table to show the remaining hash values.\nRecord key Hash value\n3003 3\n1029\n7630\n[2]\n[Turn over © UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-mj-32-q03-p01.png",
        "9618-topic-16-system-software/assets/9618-2023-mj-32-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q03",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 9
      },
      "text_excerpt": "Several syntax diagrams are shown. 3\ndigit letter\n0 A\n1 C\n2 E\n3 G\n4 I\n5 K\n6 M\n7 O\n8 Q\n9 S\nU\nW\nY\nvariable\nletter digit\n© UCLES 2023 9618/32/M/J/23\n5\nState whether each variable is valid or invalid give a reason for your choice in each case. (a) and\n...........................................................................................................................................\n9SW\nReason .....................................................................................................................................\n...................................................................................................................................................\n...........................................................................................................................................\nUWY\nReason .....................................................................................................................................\n...................................................................................................................................................\n[2]\ncontains one or more letters. (b)\n<word>\nComplete the Backus‑Naur Form (BNF) for use this to complete the BNF for and\n<word>\n.\n<variable>\n............................................................................................................................\n<word> ::=\n...................................................................................................................................................\n...................................................................................................................\n<variable> ::=\n...................................................................................................................................................\n[3]\nVehicle registrations must begin with two letters and be followed by one, two or three digits. (c)\nValid letters and digits are shown in the syntax diagrams on page 4.\nState an example of a valid vehicle registration. (i)\n...........................................................................................................................................\n..................................................................................................................................... [1]\nDraw a syntax diagram for a vehicle registration. (ii)\n[3]\n[Turn over © UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q04",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-mj-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 4
      },
      "text_excerpt": "Draw line from each Object‑Oriented Programming (OOP) term to its 4 one most appropriate\ndescription.\nOOP term Description\nmethods used to return the value of\na property\nEncapsulation\nthe process of putting data and\nmethods together as a single unit\nGetters\nmethods used to update the value of\na property\nPolymorphism\nallows methods to be redefined for\nderived classes\nSetters\nenables the defining of a new class\nthat inherits from a parent class\n[4]"
    },
    {
      "id": "9618-2023-mj-32-q05",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2023-mj-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q05",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 5
      },
      "text_excerpt": "Encryption is used to scramble data to make it meaningless if intercepted. 5 (a)\nDescribe the purpose of quantum cryptography.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain the differences between symmetric and asymmetric cryptography when encrypting (b)\nand decrypting data.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q06",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q06",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 9
      },
      "text_excerpt": "Write statements to declare the composite data type, , to hold 6 (a) pseudocode\nTAppointments\ndata about patients for a dental clinic. It will include for each patient:\n• name (first name and last name)\n• date of birth\n• telephone number\n• date of last appointment\n• date of next appointment\n• all treatments are complete (yes or no).\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\nThis pseudocode algorithm reads dental records stored in a random file using the user‑defined (b)\ndata type and prints the contents of the file, one record at a time.\nTAppointments\nComplete this file handling pseudocode:\nDECLARE DentalRecord : ARRAY[1:250] OF TAppointments\nDECLARE DentalFile : STRING\nDECLARE Count : INTEGER\n\"DentalFile.dat\" DentalFile\nOUTPUT \"The file \", DentalFile, \" contains these records:\"\n.................................................................................................................\nOPENFILE\n..........................................................................................\n1\nREPEAT\nSEEK DentalFile, Count\n.....................................................................................................................\nOUTPUT DentalRecord[Count]\nCount + 1 Count\n.....................................................................\n(DentalFile)\n.............................................................................................\n[5]\n[Turn over © UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q07",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-mj-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q07",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 6
      },
      "text_excerpt": "State examples of where it would be appropriate to use packet switching. 7 (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nGive differences between circuit switching and packet switching. (b) four\n1 ................................................................................................................................................\n...................................................................................................................................................\n2 ................................................................................................................................................\n...................................................................................................................................................\n3 ................................................................................................................................................\n...................................................................................................................................................\n4 ................................................................................................................................................\n...................................................................................................................................................\n[4]\n© UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q08",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-mj-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q08",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 6
      },
      "text_excerpt": "Describe the use of pipelining in Reduced Instruction Set Computers (RISC). 8 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nThe processing of instructions is divided into five stages: (b)\n• instruction fetch (IF)\n• instruction decode (ID)\n• operand fetch (OF)\n• instruction execute (IE)\n• write back result (WB)\nEach stage is carried out using a different register when pipelining is used.\nComplete the table to show how a program consisting of instructions would be completed six\nusing pipelining.\nClock cycles\n1 2 3 4 5 6 7 8 9 10 11 12\nIF\nsegats\nID\nrossecorP\nOF\nIE\nWB\n[4]\n[Turn over © UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q09",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-mj-32-q09-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-mj-32-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q09",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 10
      },
      "text_excerpt": "This truth table represents a logic circuit. 9\nINPUT OUTPUT\nA B C D Z\n0 0 0 0 1\n0 0 0 1 1\n0 0 1 0 1\n0 0 1 1 1\n0 1 0 0 0\n0 1 0 1 0\n0 1 1 0 1\n0 1 1 1 1\n1 0 0 0 0\n1 0 0 1 0\n1 0 1 0 0\n1 0 1 1 0\n1 1 0 0 0\n1 1 0 1 0\n1 1 1 0 0\n1 1 1 1 0\nWrite the Boolean logic expression that corresponds to the given truth table as the (a)\nsum‑of‑products.\n............................................................................................................................................ Z =\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/M/J/23\n11\nComplete the Karnaugh map (K‑map) for the given truth table. (b)\nAB\nCD 00 01 11 10\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) in the K‑map to produce an optimal sum‑of‑products. (c)\n[2]\nWrite the Boolean logic expression from your answer to as a simplified (d) part (c)\nsum‑of‑products.\n............................................................................................................................................ Z =\n............................................................................................................................................. [2]\nUse Boolean algebra to give your answer to in its simplest form. (e) part (d)\n...................................................................................................................................... [1] Z ="
    },
    {
      "id": "9618-2023-mj-32-q10",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2023-mj-32-q10-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2023-mj-32-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q10",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 6
      },
      "text_excerpt": "State category of machine learning. 10 (a) one\n............................................................................................................................................. [1]\n[Turn over © UCLES 2023 9618/32/M/J/23\n12\nCalculate the path that takes the shortest time to travel from the Begin node to the End node, (b)\nusing the A* algorithm.\nShow your working in the table provided.\nThe first two rows have already been completed.\n12\nBegin\ng = 5\nh = 8\n11 4\n5\nA D\n6 7\n7 C\nB\n6\n8\n6\n2\n8\n7 E\n5\n7 G\nEnd\n7\n1\n4\n1 F\nCost from\nDestination Heuristic Total\nStart node start node\nnode (h) (f = g + h)\n(g)\nBegin Begin 0 12 12\nBegin A 5 8 13\nFinal path\n[5]\n© UCLES 2023 9618/32/M/J/23"
    },
    {
      "id": "9618-2023-mj-32-q11",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_32.pdf?download=true",
      "source_pages": [
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q11-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q11-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-32-q11-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-32-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_32.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 10
      },
      "text_excerpt": "The pseudocode shown represents a queue Abstract Data Type (ADT) with procedures for 11 (a)\ninitialisation and to add new items. It is incomplete.\nCONSTANT MaxLength = 50\nDECLARE FrontPointer : INTEGER\nDECLARE RearPointer : INTEGER\nDECLARE Length : INTEGER\nDECLARE Queue : ARRAY[0 : MaxLength – 1] OF STRING\n// initialisation of queue\nPROCEDURE Initialise\n‑1 FrontPointer\n.....................................................................................................................\n.................................................................\n0\nENDPROCEDURE\n// adding a new item to the queue\nPROCEDURE Enqueue(NewItem : STRING)\n.............................................................................................\nIF THEN\n..................................................................................\nRearPointer\nIF RearPointer > MaxLength – 1 THEN\n0 RearPointer\nENDIF\n................................................................................................................\nLength + 1 Length\nENDIF\nENDPROCEDURE\nStudy the pseudocode and insert the identifiers to complete this table. (i)\nIdentifier Data type Description\nAn array to store the contents of the queue.\nSTRING\nPoints to the last item of the queue.\nINTEGER\nIndicates the number of items in the queue.\nINTEGER\nPoints to the first item of the queue.\nINTEGER\n[2]\nComplete the given pseudocode. [5] (ii)\n[Turn over © UCLES 2023 9618/32/M/J/23\n14\nExplain the reasons why a queue ADT works better than a stack ADT in organising print jobs. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/M/J/23\n15\nBLANK PAGE\n© UCLES 2023 9618/32/M/J/23\n16\nBLANK PAGE\nPermission to reproduce items where third‑party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer‑related information to candidates, all copyright acknowledgements are "
    },
    {
      "id": "9618-2023-mj-33-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-mj-33-q01-p01.png",
        "9618-topic-13-data-representation/assets/9618-2023-mj-33-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 6
      },
      "text_excerpt": "Numbers are stored in two different computer systems by using floating-point representation. 1\nuses: System 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nuses: System 2\n• 8 bits for the mantissa\n• 8 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nCalculate the normalised floating-point representation of 113.75 show how it would be (a) and\nrepresented in each of these two systems.\nShow your working.\nSystem 1\nMantissa Exponent\nSystem 2\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\n© UCLES 2023 9618/33/M/J/23\n3\nExplain the problem that occurred in when representing the number in 2. (b) part (a) system\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-mj-33-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2023-mj-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q02",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Draw line from each machine learning category to its description. 2 (a) one most appropriate\nMachine learning category Description\nsimulates the data-processing\ncapabilities of the human brain to\nmake decisions\nSupervised\nlearning\nenables learning by mapping an input\nto an output based on example input–\noutput pairs\nReinforcement\nlearning\nenables information related to errors\nproduced by the neural network to be\ntransmitted\nDeep\nlearning\nenables learning in an interactive\nenvironment by trial and error using\nits own experiences\nUnsupervised\nlearning\nenables learning by allowing the\nprocess to discover patterns on its\nown that were previously undetected\n[4]\nDescribe the purpose of both the A* algorithm and Dijkstra’s algorithm. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q03",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "A hashing algorithm is used to calculate storage locations for records in a random access file. 3 (a)\nIt calculates hash values by using the function modulus 3.\nThe function modulus gives the remainder after integer division.\nFor example, 1030 modulus 3 = 1. Therefore, the record key 1030 gives a hash value of 1.\nComplete the table to show the remaining hash values.\nRecord key Hash value\n1030 1\n1050\n1025\n[2]\nDescribe what happens, in relation to the storage or retrieval of a record in the file, when (b)\nthe calculated hash value is a duplicate of a previously calculated hash value for a different\nrecord key.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n© UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q04",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-mj-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Two descriptions of user-defined data types are given. 4\nGive appropriate type declaration statements for each, including appropriate names.\nA data type to hold a set of prime numbers below 20. These prime numbers are: (a)\n2, 3, 5, 7, 11, 13, 17, 19\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nA data type to point to a day in the week, for example Monday. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-mj-33-q05",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-mj-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q05",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "State, with a reason, where it would be appropriate to use circuit switching. 5 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nGive benefits and drawbacks of circuit switching. (b) two two\nBenefit 1 ...................................................................................................................................\n...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\n...................................................................................................................................................\nDrawback 1 ...............................................................................................................................\n...................................................................................................................................................\nDrawback 2 ...............................................................................................................................\n...................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q06",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-mj-33-q06-p01.png",
        "9618-topic-16-system-software/assets/9618-2023-mj-33-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q06",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 8
      },
      "text_excerpt": "Several syntax diagrams are shown. 6\ndigit operator\n0 +\n1 –\n2 *\n3 /\nsymbol\n4\n$\n5\n%\n6\n&\n7\n@\n8\n#\nletter\n9\nA\nD\nP\nR\nY\npassword\nletter digit symbol\n© UCLES 2023 9618/33/M/J/23\n7\nState whether each of the following passwords is valid or invalid and give a reason for your (a)\nchoice.\n...................................................................................................................................\nDPAD99$\nReason .....................................................................................................................................\n...................................................................................................................................................\n.....................................................................................................................................\nDAD#95\nReason .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................\nADY123?\nReason .....................................................................................................................................\n...................................................................................................................................................\n[3]\nComplete the Backus-Naur Form (BNF) for the syntax diagrams shown. (b)\n........................................................................................................................\n<symbol> ::=\n...................................................................................................................................................\n........................................................................................................................\n<letter> ::=\n...................................................................................................................................................\n[1]\nAn identifier begins with one or more letters, followed by zero digits or one digit or more (c)\ndigits.\nValid letters and digits are shown in the syntax diagrams on page 6.\nDraw a syntax diagram for an identifier.\n[4]\n[Turn over © UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q07",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-mj-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 7
      },
      "text_excerpt": "Complete the Karnaugh map (K-map) for the following Boolean expression. 7 (a)\nA.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D Z =\nAB\n00 01 11 10 CD\n00\n01\n11\n10\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (b)\nsum-of-products. [2]\nWrite the Boolean logic expression from your answer to as a simplified (c) part (b)\nsum-of-products.\n............................................................................................................................................ Z =\n............................................................................................................................................. [2]\nUse Boolean algebra to give your answer to in its simplest form. (d) part (c)\n...................................................................................................................................... [1] Z =\n© UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q08",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-mj-33-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q08",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 3
      },
      "text_excerpt": "Outline the characteristics of massively parallel computers. 8\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [3]"
    },
    {
      "id": "9618-2023-mj-33-q09",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2023-mj-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q09",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "Encryption is used to alter data into a form that makes it meaningless if intercepted. 9 (a)\nDescribe the purpose of asymmetric key cryptography.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nIdentify benefits and drawbacks of quantum cryptography. (b) two two\nBenefit 1 ...................................................................................................................................\n...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\n...................................................................................................................................................\nDrawback 1 ...............................................................................................................................\n...................................................................................................................................................\nDrawback 2 ...............................................................................................................................\n...................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-33-q10",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 5
      },
      "text_excerpt": "The pseudocode algorithm shown copies an active accounts text file to an 10\nActiveFile.txt\narchive accounts text file , one line at a time. Any blank lines found in the\nArchiveFile.txt\nactive accounts text file are replaced with the words in the archive\n\"Account not present\"\naccounts text file.\nComplete this file-handling pseudocode.\nDECLARE Account : STRING\n..........................................................................................................................................................\nOPENFILE \"ArchiveFile.txt\" FOR WRITE\n......................................................................................................................................\nWHILE NOT\nREADFILE \"ActiveFile.txt\", Account\nIF Account = \"\" THEN\n..........................................................................\nWRITEFILE \"ArchiveFile.txt\", \" \"\nELSE\n...............................................................................\nWRITEFILE \"ArchiveFile.txt\",\nENDIF\nENDWHILE\n..........................................................................................................................................................\nCLOSEFILE \"ArchiveFile.txt\"\n[5]"
    },
    {
      "id": "9618-2023-mj-33-q11",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 11,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 11
      },
      "text_excerpt": "Pseudocode is to be written to implement a queue Abstract Data Type (ADT) with items of the 11\nstring data type. This will be implemented using the information in the table.\nIdentifier Data type Description\npoints to the start of the queue\nFrontPointer INTEGER\npoints to the end of the queue\nRearPointer INTEGER\nthe current size of the queue\nLength INTEGER\n1D array to implement the queue\nQueue STRING\nA constant, with identifier , limits the size of the queue to 60 items.\nMaxSize\nWrite the pseudocode to declare , , , and (a)\nMaxSize FrontPointer RearPointer Length\n.\nQueue\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/33/M/J/23\n11\nComplete the following pseudocode for the function to remove the front item from (b)\nDequeue\nthe queue.\nFUNCTION Dequeue RETURNS STRING\nDECLARE Item : STRING\n.........................................................................................................................\n> 0 THEN\n.......................................................................................................................\nItem ←\n......................................................................................................................................\nIF Length = 0 THEN\nCALL Initialise // reset the pointers\nELSE\nIF FrontPointer > MaxSize THEN\n.......................................................................................................................\n← 1\nENDIF\nENDIF\nELSE\nOUTPUT \"The print queue was empty – error!\"\nItem ← \"\"\nENDIF\nRETURN Item\nENDFUNCTION\n[4]\nExplain how a new element can be added to the queue if it is implemented using two stacks. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n..............................................................................................."
    },
    {
      "id": "9618-2023-mj-33-q12",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_33.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-mj-33-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-33-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 7
      },
      "text_excerpt": "Describe what is meant by recursion. 12 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/33/M/J/23\n12\nA Fibonacci sequence is a series of numbers formed by adding together the two preceding (b)\nnumbers, for example:\n0, 1, 1, 2, …\nThis function calculates and returns values in the Fibonacci sequence and uses recursion.\nFUNCTION Fib(Number : INTEGER) RETURNS INTEGER\nIF Number <= 1 THEN\nResult ← Number\nELSE\nResult ← Fib(Number – 1) + Fib(Number – 2)\nENDIF\nRETURN Result\nENDFUNCTION\nComplete the trace table for the function when it is called as .\nFib(5)\nCall number Function call Number Result Return value\n5\n[5]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2023 9618/33/M/J/23"
    },
    {
      "id": "9618-2023-mj-41-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 18,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11
        ],
        "marks": 18
      },
      "text_excerpt": "A program reads data from a file and searches for specific data. 1\nThe main program needs to read 25 integer data items from the text file into a (a)\nData.txt\nlocal 1D array,\nDataArray\nWrite program code to declare the local array (i)\nDataArray\nSave your program as Question1_J2023.\nCopy and paste the program code into in the evidence document. part 1(a)(i)\n[1]\nAmend the main program to read the contents of into (ii)\nData.txt DataArray\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(a)(ii)\n[4]\nThe procedure takes an integer array as a parameter and outputs the (b) (i)\nPrintArray()\ncontents of the array in the order they are stored.\nThe items are printed on the same line, for example:\n10 4 5 13 25\nWrite program code for the procedure\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(i)\n[3]\n© UCLES 2023 9618/41/M/J/23\n3\nAmend the main program to output the contents of using the procedure (ii)\nDataArray\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(b)(iii)\n[1]\nThe function : (c)\nLinearSearch()\n• takes an integer array and integer search value as parameters\n• counts and returns the number of times the search value is found in the array.\nWrite program code for the function\nLinearSearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[3]\nAmend the main program to: (d) (i)\n• prompt the user to input a whole number between 0 and 100 inclusive\n• read and validate the input from the user\n• call with and the validated input value\nLinearSearch() DataArray\n• output the result in the format:\nThe number 7 is found 2 times.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[4]\nTest your program by inputting the number 12. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\n[Turn over © UCLES 2023 9618/41/M/J/23"
    },
    {
      "id": "9618-2023-mj-41-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 32,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_41.pdf?download=true",
        "source_pages": [
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ],
        "marks": 32
      },
      "text_excerpt": "A computer game is being designed that will include different vehicles. A prototype for the game is 2\nbeing developed using object‑oriented programming.\nThe class stores data about the vehicles. Each vehicle has an identification name,\nVehicle\na maximum speed, a current speed and a horizontal position. The value is\nIncreaseAmount\nadded to the current speed each time the vehicle increases its speed.\nVehicle\nstores the identification name for the vehicle\nID : STRING\nstores the maximum speed\nMaxSpeed : INTEGER\nstores the current speed\nCurrentSpeed : INTEGER\nstores the amount increases by\nIncreaseAmount : INTEGER CurrentSpeed\nstores the horizontal position\nHorizontalPosition : INTEGER\ninitialises , and to the\nConstructor() ID MaxSpeed IncreaseAmount\nparameter values\ninitialises both and\nCurrentSpeed\nto\nHorizontalPosition 0\nreturns the current speed\nGetCurrentSpeed()\nreturns the increase amount\nGetIncreaseAmount()\nreturns the horizontal position\nGetHorizontalPosition()\nreturns the maximum speed\nGetMaxSpeed()\nassigns the parameter to the current speed\nSetCurrentSpeed()\nassigns the parameter to the horizontal position\nSetHorizontalPosition()\ncalculates and stores the new speed and horizontal\nIncreaseSpeed()\nposition of the vehicle\nWrite program code to declare the class . All attributes must be private. (a) (i)\nVehicle\nYou only need to declare the class and its constructor. Do not declare any other methods.\nUse your programming language’s appropriate constructor.\nIf you are writing program code in Python, include attribute declarations using comments.\nSave your program as Question2_J2023.\nCopy and paste the program code into in the evidence document. part 2(a)(i)\n[5]\n© UCLES 2023 9618/41/M/J/23\n5\nWrite program code for the get methods , (ii)\nGetCurrentSpeed()\n, and\nGetIncreaseAmount() GetMaxSpeed() GetHorizontalPosition()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(ii)\n[3]\nWrite program code for the set methods and (iii)\nSetCurrentSpeed()\nSetHorizontalPosition()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iii)\n[3]\nThe method : (iv)\nIncreaseSpeed()\n• adds to the current speed\nIncreaseAmount\n• adds the updated current speed to the horizontal position.\nThe current speed of a vehicle cannot exceed its maximum speed.\nWrite program code for the method\nIncreaseSpeed()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iv)\n[3]\n[Turn over © UCLES 2023 9618/41/M/J/23\n6\nThe child class inherits from the parent class . A helicopter also has a (b)\nHelicopter Vehicle\nvertical position and changes the vertical position when it increases speed.\nHelicopter\nstores the vertical position\nVerticalPosition : INTEGER\nstores the amount changes by\nVerticalChange : INTEGER VerticalPosition\nstores the maximum height the helicopter can reach\nMaxHeight : INTEGER\ntakes the ID, maximum speed, increase amount, vertical\nConstructor()\nchange and maximu"
    },
    {
      "id": "9618-2023-mj-41-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-mj-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_41.pdf?download=true",
        "source_pages": [
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38
        ],
        "marks": 25
      },
      "text_excerpt": "A program implements two stacks using 1D arrays. One stack stores the names of colours. One 3\nstack stores the names of animals.\nThe program contains the following global arrays and variables: (a)\n• 1D array to store the names of up to 20 animals.\nAnimal\n• 1D array to store the names of up to 10 colours.\nColour\n• to point to the next free space in the array , initialised to 0.\nAnimalTopPointer Animal\n• to point to the next free space in the array , initialised to 0.\nColourTopPointer Colour\nWrite program code to declare the global arrays and variables.\nSave your program as Question3_J2023.\nCopy and paste the program code into in the evidence document. part 3(a)\n[3]\nStudy the pseudocode function : (b) (i)\nPushAnimal()\nFUNCTION PushAnimal(DataToPush : STRING) RETURNS BOOLEAN\nIF AnimalTopPointer = 20 THEN\nRETURN FALSE\nELSE\nDataToPush Animal[AnimalTopPointer]\nAnimalTopPointer + 1 AnimalTopPointer\nRETURN TRUE\nENDIF\nENDFUNCTION\nWrite program code for the function\nPushAnimal()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(i)\n[3]\n© UCLES 2023 9618/41/M/J/23\n9\nStudy the pseudocode function : (ii)\nPopAnimal()\nFUNCTION PopAnimal() RETURNS STRING\nDECLARE ReturnData : STRING\nIF AnimalTopPointer = 0 THEN\nRETURN \"\"\nELSE\nAnimal[AnimalTopPointer - 1] ReturnData\nAnimalTopPointer - 1 AnimalTopPointer\nRETURN ReturnData\nENDIF\nENDFUNCTION\nWrite program code to declare the function\nPopAnimal()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(ii)\n[3]\nThe procedure : (iii)\nReadData()\n• reads the animal names from the file\nAnimalData.txt\n• uses to insert each name onto the stack\nPushAnimal()\n• uses appropriate exception handling if the file does not exist.\nWrite program code for the procedure\nReadData()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(iii)\n[5]\nThe function performs the same actions as but inserts (iv)\nPushColour() PushAnimal()\nan item into .\nColour\nThe function performs the same actions as but removes\nPopColour() PopAnimal()\nthe next item from .\nColour\nWrite program code for the functions and\nPushColour() PopColour()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(iv)\n[2]\n[Turn over © UCLES 2023 9618/41/M/J/23\n10\nAmend the procedure so that it also: (v)\nReadData()\n• reads the colours from the text file\nColourData.txt\n• uses to insert each colour onto the stack\nPushColour()\n• uses appropriate exception handling if the file does not exist.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(v)\n[2]\nThe procedure : (c)\nOutputItem()\n• pops the next item from both and\nAnimal Colour\n• outputs the colour and animal on one line, for example\n\"black horse\"\nIf there is no data in :\nColour\n• the animal is pushed back onto\nAnimal\n• is output.\n\"No colour\"\nIf there is no data in :\nAnimal\n• the colour is pushed back onto\nColour\n• is output.\n\"No animal\"\nWrite pr"
    },
    {
      "id": "9618-2023-mj-42-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 14,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q01-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10
        ],
        "marks": 14
      },
      "text_excerpt": "A 1D array needs to store the names of 10 animals. 1\nWrite program code to declare the global string array to store 10 items. (a)\nAnimals\nSave your program as Question1_J2023.\nCopy and paste the program code into in the evidence document. part 1(a)\n[2]\nThe main program needs to store the following animals in the array: (b)\nhorse\nlion\nrabbit\nmouse\nbird\ndeer\nwhale\nelephant\nkangaroo\ntiger\nWrite program code to store these animal names in the array.\nThe names must be in lower case and stored in the order given in the list.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)\n[2]\n© UCLES 2023 9618/42/M/J/23\n3\nThe following pseudocode procedure sorts the array into a descending alphabetical order (c)\nusing only the first character in each animal name.\nThe function returns the number of elements in the array .\nLENGTH(DataArray) DataArray\nThe function returns number of characters\nMID(String, Start, Quantity) Quantity\nfrom starting at index . The first character in the string is index 0, for example:\nString Start\nwill return\nMID(\"tiger\", 0, 2) \"ti\"\nThere are incomplete statements in the procedure. four\nPROCEDURE SortDescending()\nDECLARE ArrayLength : INTEGER\nDECLARE Temp : STRING\nLENGTH(Animals) ArrayLength\n0 TO ArrayLength - 1 FOR X\n……………… TO ArrayLength - X - 1 FOR Y\nIF MID(Animals[Y], 0, 1) < MID(Animals[………………], 0, 1) THEN\nAnimals[………………] Temp\nAnimals[Y + 1] Animals[Y]\n……………… Animals[Y + 1]\nENDIF\nNEXT Y\nNEXT X\nENDPROCEDURE\nWrite program code for the procedure .\nSortDescending()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[6]\n[Turn over © UCLES 2023 9618/42/M/J/23\n4\nWrite program code to amend the main program to: (d) (i)\n• call the procedure\nSortDescending()\n• output the sorted contents of the array with each animal name on a new line.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[3]\nTest your program. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\n© UCLES 2023 9618/42/M/J/23"
    },
    {
      "id": "9618-2023-mj-42-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 28,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_42.pdf?download=true",
      "source_pages": [
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_42.pdf?download=true",
        "source_pages": [
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22
        ],
        "marks": 28
      },
      "text_excerpt": "A business sells a single product. Customers can purchase one or more of this product. 2\nEach sale has an ID and a quantity, for example \"ABC\" and 2\nThe business needs a program to store the data about the sales in a circular queue data structure.\nWrite program code to declare a record structure, , to store the data about each (a)\nSaleData\nsale.\nSave your program as Question2_J2023.\nCopy and paste the program code into in the evidence document. part 2(a)\n[2]\nWrite program code to: (b)\n• declare a global array, , of 5 items to store the sale records\nCircularQueue\n• declare the global pointers and\nHead Tail\n• declare the global variable\nNumberOfItems\n• initialise all elements of the array to an empty record, where the ID is\nCircularQueue\nnull ( ) and quantity is\n\"\" -1\n• initialise , and to\nHead Tail NumberOfItems 0\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(b)\n[4]\nThe function : (c)\nEnqueue()\n• takes a new record as a parameter\n• inserts the record in the circular queue at the element pointed to by\nTail\n• updates pointers and other variables as required\n• returns if the circular queue is full\n−1\n• returns if the record is stored successfully.\n1\nWrite program code for the function .\nEnqueue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(c)\n[6]\n[Turn over © UCLES 2023 9618/42/M/J/23\n6\nThe function : (d)\nDequeue()\n• returns a null or empty record if the circular queue is empty\n• returns the first record in the queue if the circular queue is not empty\n• updates pointers and other variables as required.\nWrite program code for the function .\nDequeue()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(d)\n[6]\nThe procedure : (e)\nEnterRecord()\n• takes an ID and quantity as input and creates a sale record\n• uses to insert the record in the circular queue\nEnqueue()\n• outputs if the record was not inserted in the circular queue\n\"Full\"\n• outputs if the record was inserted in the circular queue.\n\"Stored\"\nWrite program code for the procedure .\nEnterRecord()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(e)\n[5]\n© UCLES 2023 9618/42/M/J/23\n7\nThe following sale records need to be entered into the program: (f)\nID Quantity\nADF 10\nOOP 1\nBXW 5\nXXZ 22\nHQR 6\nLLP 3\nAmend the main program to: (i)\n• use to input the six records in the table\nEnterRecord()\n• use to remove one record\nDequeue()\n• output either the ID and quantity of the removed record, or an error message if the\ncircular queue is empty\n• use to input the record with the ID \"LLP\" for a second time\nEnterRecord()\n• output the ID and quantity for all the records currently stored in the array\n.\nCircularQueue\nWrite program code to perform these tasks.\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(f)(i)\n[4]\nTest your program. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screensh"
    },
    {
      "id": "9618-2023-mj-42-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 33,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_42.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-mj-42-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_42.pdf?download=true",
        "source_pages": [
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37
        ],
        "marks": 33
      },
      "text_excerpt": "A company needs a computer program to store data about its employees. 3\nPart of the program is being written using object‑oriented programming.\nThe class stores data about the employees. Each employee has an employee number,\nEmployee\na job title and hourly pay rate. The class will also store the amount they are paid each week over a\n52‑week year in a 1D array.\nEmployee\nstores the amount each employee gets paid each\nHourlyPay : REAL\nhour\nstores the employee’s unique number\nEmployeeNumber : STRING\nstores the employee’s job title\nJobTitle : STRING\nstores the amount the employee has been paid each\nPayYear2022 : ARRAY[0:51] OF REAL\nweek\ninitialises , and Constructor() HourlyPay EmployeeNumber\nfrom the values passed as parameters\nJobTitle\ninitialises all 52 elements in to\nPayYear2022 0.0\nreturns the employee number GetEmployeeNumber()\ntakes the week number and number of hours worked\nSetPay()\nthat week as parameters\ncalculates and stores the pay for that week in\nPayYear2022\nreturns the total of all the values in\nPayYear2022 GetTotalPay()\nWrite program code to declare the class . (a) (i)\nEmployee\nYou only need to declare the class and its constructor. Do declare any other methods. not\nUse your programming language appropriate constructor.\nIf you are writing program code in Python, include attribute declarations using comments.\nSave your program as Question3_J2023.\nCopy and paste the program code into in the evidence document. part 3(a)(i)\n[5]\nThe method returns the employee number. (ii)\nGetEmployeeNumber()\nWrite program code for the method .\nGetEmployeeNumber()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(a)(ii)\n[2]\n© UCLES 2023 9618/42/M/J/23\n9\nThe method : (iii)\nSetPay()\n• takes a week number and the number of hours worked that week as parameters\n• calculates the pay for that week by multiplying the hourly pay by the number of\nhours worked that week\n• stores the calculated pay in the appropriate index for that week in .\nPayYear2022\nWrite program code for the method .\nSetPay()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(a)(iii)\n[3]\nThe method returns the total of all the values in . (iv)\nGetTotalPay() PayYear2022\nWrite program code for the method .\nGetTotalPay()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(a)(iv)\n[2]\n[Turn over © UCLES 2023 9618/42/M/J/23\n10\nThe child class inherits from the parent class . (b)\nManager Employee\nA manager gets a bonus. This bonus value is a percentage, for example 10.0%.\nWhen calculating the pay, the number of hours the manager worked that week is increased\nby the bonus value.\nManager\nstores the bonus value, for example 10.0 represents a\nBonusValue : REAL\n10.0% increase\ntakes bonus value, hourly pay, employee number and job title\nConstructor()\nas parameters\ninitialises to its parameter value\nBonusValue\ntakes the week number and number of hours worked as\nSetPay()\nparameters\nincreases the numb"
    },
    {
      "id": "9618-2023-mj-43-q01",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 18,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11
        ],
        "marks": 18
      },
      "text_excerpt": "A program reads data from a file and searches for specific data. 1\nThe main program needs to read 25 integer data items from the text file into a (a)\nData.txt\nlocal 1D array,\nDataArray\nWrite program code to declare the local array (i)\nDataArray\nSave your program as Question1_J2023.\nCopy and paste the program code into in the evidence document. part 1(a)(i)\n[1]\nAmend the main program to read the contents of into (ii)\nData.txt DataArray\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(a)(ii)\n[4]\nThe procedure takes an integer array as a parameter and outputs the (b) (i)\nPrintArray()\ncontents of the array in the order they are stored.\nThe items are printed on the same line, for example:\n10 4 5 13 25\nWrite program code for the procedure\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(i)\n[3]\n© UCLES 2023 9618/43/M/J/23\n3\nAmend the main program to output the contents of using the procedure (ii)\nDataArray\nPrintArray()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(b)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(b)(iii)\n[1]\nThe function : (c)\nLinearSearch()\n• takes an integer array and integer search value as parameters\n• counts and returns the number of times the search value is found in the array.\nWrite program code for the function\nLinearSearch()\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(c)\n[3]\nAmend the main program to: (d) (i)\n• prompt the user to input a whole number between 0 and 100 inclusive\n• read and validate the input from the user\n• call with and the validated input value\nLinearSearch() DataArray\n• output the result in the format:\nThe number 7 is found 2 times.\nSave your program.\nCopy and paste the program code into in the evidence document. part 1(d)(i)\n[4]\nTest your program by inputting the number 12. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into in the evidence document. part 1(d)(ii)\n[1]\n[Turn over © UCLES 2023 9618/43/M/J/23"
    },
    {
      "id": "9618-2023-mj-43-q02",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 32,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_43.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q02-p03.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_43.pdf?download=true",
        "source_pages": [
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ],
        "marks": 32
      },
      "text_excerpt": "A computer game is being designed that will include different vehicles. A prototype for the game is 2\nbeing developed using object‑oriented programming.\nThe class stores data about the vehicles. Each vehicle has an identification name,\nVehicle\na maximum speed, a current speed and a horizontal position. The value is\nIncreaseAmount\nadded to the current speed each time the vehicle increases its speed.\nVehicle\nstores the identification name for the vehicle\nID : STRING\nstores the maximum speed\nMaxSpeed : INTEGER\nstores the current speed\nCurrentSpeed : INTEGER\nstores the amount increases by\nIncreaseAmount : INTEGER CurrentSpeed\nstores the horizontal position\nHorizontalPosition : INTEGER\ninitialises , and to the\nConstructor() ID MaxSpeed IncreaseAmount\nparameter values\ninitialises both and\nCurrentSpeed\nto\nHorizontalPosition 0\nreturns the current speed\nGetCurrentSpeed()\nreturns the increase amount\nGetIncreaseAmount()\nreturns the horizontal position\nGetHorizontalPosition()\nreturns the maximum speed\nGetMaxSpeed()\nassigns the parameter to the current speed\nSetCurrentSpeed()\nassigns the parameter to the horizontal position\nSetHorizontalPosition()\ncalculates and stores the new speed and horizontal\nIncreaseSpeed()\nposition of the vehicle\nWrite program code to declare the class . All attributes must be private. (a) (i)\nVehicle\nYou only need to declare the class and its constructor. Do not declare any other methods.\nUse your programming language’s appropriate constructor.\nIf you are writing program code in Python, include attribute declarations using comments.\nSave your program as Question2_J2023.\nCopy and paste the program code into in the evidence document. part 2(a)(i)\n[5]\n© UCLES 2023 9618/43/M/J/23\n5\nWrite program code for the get methods , (ii)\nGetCurrentSpeed()\n, and\nGetIncreaseAmount() GetMaxSpeed() GetHorizontalPosition()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(ii)\n[3]\nWrite program code for the set methods and (iii)\nSetCurrentSpeed()\nSetHorizontalPosition()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iii)\n[3]\nThe method : (iv)\nIncreaseSpeed()\n• adds to the current speed\nIncreaseAmount\n• adds the updated current speed to the horizontal position.\nThe current speed of a vehicle cannot exceed its maximum speed.\nWrite program code for the method\nIncreaseSpeed()\nSave your program.\nCopy and paste the program code into in the evidence document. part 2(a)(iv)\n[3]\n[Turn over © UCLES 2023 9618/43/M/J/23\n6\nThe child class inherits from the parent class . A helicopter also has a (b)\nHelicopter Vehicle\nvertical position and changes the vertical position when it increases speed.\nHelicopter\nstores the vertical position\nVerticalPosition : INTEGER\nstores the amount changes by\nVerticalChange : INTEGER VerticalPosition\nstores the maximum height the helicopter can reach\nMaxHeight : INTEGER\ntakes the ID, maximum speed, increase amount, vertical\nConstructor()\nchange and maximu"
    },
    {
      "id": "9618-2023-mj-43-q03",
      "subject": "9618",
      "year": 2023,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_qp_43.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-may-june/qp/9618_s23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-mj-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-mj-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-mj-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-may-june/ms/9618_s23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-May-June/9618_s23_ms_43.pdf?download=true",
        "source_pages": [
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38
        ],
        "marks": 25
      },
      "text_excerpt": "A program implements two stacks using 1D arrays. One stack stores the names of colours. One 3\nstack stores the names of animals.\nThe program contains the following global arrays and variables: (a)\n• 1D array to store the names of up to 20 animals.\nAnimal\n• 1D array to store the names of up to 10 colours.\nColour\n• to point to the next free space in the array , initialised to 0.\nAnimalTopPointer Animal\n• to point to the next free space in the array , initialised to 0.\nColourTopPointer Colour\nWrite program code to declare the global arrays and variables.\nSave your program as Question3_J2023.\nCopy and paste the program code into in the evidence document. part 3(a)\n[3]\nStudy the pseudocode function : (b) (i)\nPushAnimal()\nFUNCTION PushAnimal(DataToPush : STRING) RETURNS BOOLEAN\nIF AnimalTopPointer = 20 THEN\nRETURN FALSE\nELSE\nDataToPush Animal[AnimalTopPointer]\nAnimalTopPointer + 1 AnimalTopPointer\nRETURN TRUE\nENDIF\nENDFUNCTION\nWrite program code for the function\nPushAnimal()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(i)\n[3]\n© UCLES 2023 9618/43/M/J/23\n9\nStudy the pseudocode function : (ii)\nPopAnimal()\nFUNCTION PopAnimal() RETURNS STRING\nDECLARE ReturnData : STRING\nIF AnimalTopPointer = 0 THEN\nRETURN \"\"\nELSE\nAnimal[AnimalTopPointer - 1] ReturnData\nAnimalTopPointer - 1 AnimalTopPointer\nRETURN ReturnData\nENDIF\nENDFUNCTION\nWrite program code to declare the function\nPopAnimal()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(ii)\n[3]\nThe procedure : (iii)\nReadData()\n• reads the animal names from the file\nAnimalData.txt\n• uses to insert each name onto the stack\nPushAnimal()\n• uses appropriate exception handling if the file does not exist.\nWrite program code for the procedure\nReadData()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(iii)\n[5]\nThe function performs the same actions as but inserts (iv)\nPushColour() PushAnimal()\nan item into .\nColour\nThe function performs the same actions as but removes\nPopColour() PopAnimal()\nthe next item from .\nColour\nWrite program code for the functions and\nPushColour() PopColour()\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(iv)\n[2]\n[Turn over © UCLES 2023 9618/43/M/J/23\n10\nAmend the procedure so that it also: (v)\nReadData()\n• reads the colours from the text file\nColourData.txt\n• uses to insert each colour onto the stack\nPushColour()\n• uses appropriate exception handling if the file does not exist.\nSave your program.\nCopy and paste the program code into in the evidence document. part 3(b)(v)\n[2]\nThe procedure : (c)\nOutputItem()\n• pops the next item from both and\nAnimal Colour\n• outputs the colour and animal on one line, for example\n\"black horse\"\nIf there is no data in :\nColour\n• the animal is pushed back onto\nAnimal\n• is output.\n\"No colour\"\nIf there is no data in :\nAnimal\n• the colour is pushed back onto\nColour\n• is output.\n\"No animal\"\nWrite pr"
    },
    {
      "id": "9618-2023-on-31-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-on-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 5
      },
      "text_excerpt": "Real numbers are stored in a computer using floating-point representation with: 1\n• 12 bits for the mantissa\n• 4 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nWrite the normalised floating-point representation of +65.25 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nExplain the problem that will occur in storing the normalised floating-point representation of (b)\n+65.20 in this system.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-on-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 6
      },
      "text_excerpt": "Draw line to connect protocol to its most appropriate use. 2 (a) one each\nProtocol Use\nto provide peer-to-peer file sharing\nHTTP\nwhen retrieving email messages from a\nmail server over a TCP/IP connection\nBitTorrent\nwhen transmitting hypertext documents\nSMTP\nto map MAC addresses onto IP addresses\nIMAP\nwhen sending email messages towards\nthe intended destination\n[4]\nOutline the purpose of the in the TCP / IP protocol suite. (b) Link layer\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-on-31-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Describe what is meant by and data types. 3 enumerated pointer\nEnumerated ......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nPointer ..............................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q04",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Describe sequential and random methods of file organisation. 4 (a)\nSequential file organisation .......................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nRandom file organisation ..........................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nOutline the process of sequential access for serial and sequential files. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-on-31-q05",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-31-q05-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-31-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q05",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Describe the features of SISD and MIMD computer architectures. 5\nSISD .................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nMIMD ................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2023 9618/31/O/N/23\n5\nBLANK PAGE\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q06",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-31-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-31-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "This diagram represents a logic circuit. 6\nA\nB\nZ\nC\nD\nComplete the truth table for the given logic circuit. (a)\nWorking space\nA B C D Z\n0 0 0 0\n0 0 0 1\n0 0 1 0\n0 0 1 1\n0 1 0 0\n0 1 0 1\n0 1 1 0\n0 1 1 1\n1 0 0 0\n1 0 0 1\n1 0 1 0\n1 0 1 1\n1 1 0 0\n1 1 0 1\n1 1 1 0\n1 1 1 1\n[3]\n© UCLES 2023 9618/31/O/N/23\n7\nSimplify the given Boolean expression using Boolean algebra. (b)\nShow your working.\nA.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D Y =\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]"
    },
    {
      "id": "9618-2023-on-31-q07",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q07",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 5
      },
      "text_excerpt": "A student buys a new computer. 7 (a)\nState benefit to the student of a user interface give an example. one and\nBenefit ......................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nExample ....................................................................................................................................\n...................................................................................................................................................\n[2]\nTwo of the process states are the running state and the ready state. (b)\nIdentify process state. one other\n............................................................................................................................................. [1]\nOutline conditions under which a process could change from the running state to the ready (c)\nstate.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q08",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 8
      },
      "text_excerpt": "A pseudocode algorithm finds a customer account record in a random file and outputs it. The 8 (a)\nrecords are stored using the user-defined data type .\nTAccount\nTYPE TAccount\nDECLARE AccountNumber : INTEGER\nDECLARE LastName : STRING\nDECLARE FirstName : STRING\nDECLARE Address : STRING\nDECLARE ContactNumber : STRING\nENDTYPE\nComplete the file handling pseudocode.\nThe function takes the customer account number as a parameter, calculates and\nHash()\nreturns the hash value.\nDECLARE Customer : TAccount\nDECLARE Location : INTEGER\nDECLARE AccountFile : STRING\n..................................................................................................\n\"AccountRecords.dat\"\n............................................................... ..........................................................\nAccountFile\nOUTPUT \"Please enter an account number\"\nINPUT Customer.AccountNumber\n..............................................................................................................)\nHash( Location\n..................................................................................................................... ,\nSEEK Location\n............................................................. ..........................................................\nAccountFile,\nOUTPUT Customer // output customer record\nCLOSEFILE AccountFile\n[5]\nDefine the term handling. (b) exception\n...................................................................................................................................................\n............................................................................................................................................. [1]\nState possible causes of an exception. (c) two\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q09",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-on-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 9
      },
      "text_excerpt": "Write the infix expression for this Reverse Polish Notation (RPN) expression: 9 (a) (i)\n5 2 – 5 4 + * 9 /\n...........................................................................................................................................\n..................................................................................................................................... [2]\nShow how the contents of the following stack will change as the RPN expression in (ii)\npart is evaluated. (a)(i)\n[4]\nExplain how a stack can be used to evaluate RPN expressions. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q10",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-31-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-31-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 10
      },
      "text_excerpt": "A stack is to be set up using the information in the table. 10\nIdentifier Data type Description\npoints to the bottom of the stack\nBasePointer INTEGER\npoints to the top of the stack\nTopPointer INTEGER\n1D array to implement the stack\nStack REAL\nA constant, with identifier , limits the size of the stack to 25 items.\nCapacity\nWrite the for the required declarations. (a) pseudocode\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nComplete the pseudocode function to pop an item from . (b)\nPop() Stack\n// popping an item from the stack\n...............................................................................\nFUNCTION Pop()\nDECLARE Item : REAL\n0 Item\n...............................................................................\nBasePointer THEN\n...............................................................................\nItem\n...............................................................................\nTopPointer\nELSE\nOUTPUT \"The stack is empty – error\"\nENDIF\n...............................................................................\nENDFUNCTION\n[5]\n© UCLES 2023 9618/31/O/N/23\n11\nCompare and contrast the queue and stack Abstract Data Types (ADT). (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q11",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-31-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-31-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "A programming language is used to represent subjects that students can choose to 11 declarative\nstudy.\nStudents must choose two subjects.\n01 subject(mathematics).\n02 subject(physics).\n03 subject(chemistry).\n04 subject(computer_science).\n05 subject(geography).\n06 subject(history).\n07 subject(english).\n08 subject(biology).\n09 student(tomaz).\n10 student(josephine).\n11 student(elspeth).\n12 student(nico).\n13 student(teresa).\n14 student(pietre).\n15 choice1(tomaz, mathematics).\n16 choice1(teresa, chemistry).\n17 choice1(pietre, mathematics).\n18 choice1(nico, mathematics).\n19 choice1(elspeth, chemistry).\n20 choice2(tomaz, computer_science).\n21 choice2(nico, geography).\nThese clauses have the meanings:\nClause Meaning\nMathematics is a subject.\n01\nTomaz is a student.\n09\nTomaz has chosen mathematics as his first choice.\n15\nTomaz has chosen computer science as his second choice.\n20\n© UCLES 2023 9618/31/O/N/23\n13\nAnthony is a student who would like to study history and geography. (a)\nWrite additional clauses to represent this information.\n.............................................................................................................................................\n22\n.............................................................................................................................................\n23\n.............................................................................................................................................\n24\n[3]\nUsing the variable , the goal: (b)\nX\nchoice1(X, chemistry)\nreturns\nX = teresa, elspeth\nWrite the result returned by the goal:\nchoice1(X, mathematics)\n..................................................................................................................................... [1]\nX =\nStudents must choose two different subjects such that: (c)\nN may choose S, if N is a student and S is a subject and N has not chosen S as the first\nchoice.\nWrite this as a rule.\nmay_choose_subject(N, S)\n.............................................................................................................................................\nIF\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-31-q12",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 12,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_31.pdf?download=true",
      "source_pages": [
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-31-q12-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-31-q12-p02.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-31-q12-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-31-q12",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_31.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 4
      },
      "text_excerpt": "Artificial neural networks have played a significant role in the development of machine learning. 12\nExplain what is meant by the term network. artificial neural\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [4]\n© UCLES 2023 9618/31/O/N/23\n15\nBLANK PAGE\n© UCLES 2023 9618/31/O/N/23\n16\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2023 9618/31/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-on-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 6
      },
      "text_excerpt": "Real numbers are stored in a computer using floating point representation with: 1 (a)\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nWrite the normalised floating‑point representation of –96.75 in this system.\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nExplain why a binary representation is sometimes only an approximation to the real number it (b)\nrepresents.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 4
      },
      "text_excerpt": "Describe what is meant by and data types. 2 composite non‑composite\nComposite ........................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nNon‑composite .................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]"
    },
    {
      "id": "9618-2023-on-32-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q03",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          3,
          4
        ],
        "marks": 5
      },
      "text_excerpt": "The location of a record in a random file is determined using a hashing algorithm. 3\nA collision may occur during the process of adding a record.\nOutline what is meant by the term in this context. (a) collision\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how a collision can be dealt with when writing records to a random file. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q04",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-on-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 3
      },
      "text_excerpt": "Complete the following paragraph about a suite, using words from the given list. 4 protocol\nSome words are used. not\nBitTorrent circuit switching layered link list\npeer‑to‑peer queue stack star TCP/IP\nThe protocols in a ............................................................................. determine the interconnectivity\nrules for a ............................................................................. network model such as the\n............................................................................. model.\n[3]"
    },
    {
      "id": "9618-2023-on-32-q05",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-on-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 5
      },
      "text_excerpt": "Outline the reasons why an operating system may need to use virtual memory. 5 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain the circumstances in which disk thrashing could occur. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q06",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-on-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q06",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 7
      },
      "text_excerpt": "The Reverse Polish Notation (RPN) expression: 6 (a)\na b * 2 / c d / *\nis to be evaluated where a = 20, b = 3, c = 10 and d = 5.\nShow the changing contents of the following stack as the RPN expression is evaluated.\n[4]\nExplain how an expression stored in RPN can be evaluated. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q07",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 5
      },
      "text_excerpt": "This logic circuit represents the Boolean expression: 7 (a) X = A + B + C\nA\nX B\nC\nComplete this truth table for the given logic circuit.\nA B C X\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[1]\nApply De Morgan’s laws to the expression: (b) X = A + B + C\n= ...................................................................................................................................... [1] X\nSimplify the following expression using Boolean algebra. (c)\nShow all the stages in your simplification.\nT = X.Y.Z + X.Y.Z + X\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q08",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 5
      },
      "text_excerpt": "Calculate the shortest distance between the and each of the destinations in the diagram 8 Start\nusing Dijkstra’s algorithm.\nShow your working write your answers in the table provided. and\n4\n8 A B\nC\n2\n3\n8 9\nD\n2\nE\n7\n10\nStart\nF\nWorking ............................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nAnswers:\nA B C D E F\n[5]\n[Turn over © UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q09",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 13,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-on-32-q09-p01.png",
        "9618-topic-16-system-software/assets/9618-2023-on-32-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 13
      },
      "text_excerpt": "A stack Abstract Data Type (ADT) is to be implemented using pseudocode, with procedures 9 (a)\nto initialise it and to push new items onto the stack.\nA 1D array stores the contents of the stack.\nStack\nStudy the pseudocode in and complete the table of identifiers by writing the (i) part (a)(ii)\nmissing data types and descriptions.\nIdentifier Data type Description\nBasePointer\nTopPointer\nStack REAL\n[2]\nComplete the pseudocode. (ii)\nCONSTANT MaxSize = 40\nDECLARE BasePointer : INTEGER\nDECLARE TopPointer : INTEGER\nDECLARE Stack : ARRAY[1:40] OF REAL\n// initialisation of stack\nPROCEDURE Initialise()\n................................................................................\n1\n................................................................................\n0\nENDPROCEDURE\n// push an item onto the stack\nPROCEDURE Push(NewItem : REAL)\n................................................................................\nMaxSize THEN\n..........................................................................................................\n.............................................................\nStack[TopPointer]\nENDIF\nENDPROCEDURE\n[5]\n© UCLES 2023 9618/32/O/N/23\n9\nJustify the use of a linked list instead of an array to implement a stack. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how a compiler makes use of a stack when translating recursive programming code. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................"
    },
    {
      "id": "9618-2023-on-32-q10",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-32-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q10",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 4
      },
      "text_excerpt": "Describe the features of the SIMD and MISD computer architectures. 10\nSIMD ................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nMISD ................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/32/O/N/23"
    },
    {
      "id": "9618-2023-on-32-q11",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-32-q11-p01.png",
        "9618-topic-20-further-programming/assets/9618-2023-on-32-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q11",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 9
      },
      "text_excerpt": "A programming language is used to represent some facts about people and their 11 declarative\nhobbies.\n01 hobby(music).\n02 hobby(caving).\n03 hobby(climbing).\n04 hobby(camping).\n05 hobby(baking).\n06 hobby(travelling).\n07 person(toby).\n08 person(natasha).\n09 person(fatima).\n10 person(joseph).\n11 person(elijah).\n12 person(nina).\n13 enjoys(natasha, travelling).\n14 enjoys(toby, climbing).\n15 enjoys(nina, climbing).\n16 enjoys(elijah, camping).\n17 enjoys(fatima, baking).\n18 enjoys(joseph, camping).\n19 dislikes(toby, caving).\nThese clauses have the meanings:\nClause Meaning\nMusic is a hobby\n01\nToby is a person\n07\nNatasha enjoys travelling\n13\nToby dislikes caving\n19\nCarlos is a person who enjoys the hobby of cycling but does not like music. (a)\nWrite additional clauses to represent this information.\n............................................................................................................................................\n20\n............................................................................................................................................\n21\n............................................................................................................................................\n22\n............................................................................................................................................\n23\n[4]\n© UCLES 2023 9618/32/O/N/23\n11\nUsing the variable , the goal: (b)\nP\nenjoys(P, camping)\nreturns\nP = elijah, joseph\nWrite the result returned by the goal:\nenjoys(P, climbing)\n.................................................................................................................................... [1]\nP =\nN is a person who might enjoy H if H is a hobby and N does not dislike H. (c)\nWrite this as a rule.\nmight_enjoy(N, H)\n............................................................................................................................................\nIF\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2023-on-32-q12",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_32.pdf?download=true",
      "source_pages": [
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p04.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p05.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-32-q12-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-32-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_32.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 9
      },
      "text_excerpt": "Describe, with an example, what is meant by an exception. 12 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/32/O/N/23\n12\nA pseudocode algorithm searches for a customer record in a random file (b)\n. A user inputs the name of the customer.\nAccountRecord.dat\nThe records are stored using the user‑defined data type .\nTAccount\nTYPE TAccount\nDECLARE AccountNumber : INTEGER\nDECLARE Name : STRING\nDECLARE Address : STRING\nDECLARE Telephone : STRING\nENDTYPE\nIf the record is found, it is output, otherwise an error message is displayed.\nComplete the file handling pseudocode.\nDECLARE Customer : TAccount\nDECLARE Location : INTEGER\nDECLARE MaxSize : INTEGER\nDECLARE FoundFlag : BOOLEAN\nDECLARE SearchCustomer : STRING\nMaxSize 1000\n...............................................................................................................\nOPENFILE\nLocation 1\n...............................................................................................................\nFALSE\nOUTPUT \"Enter the customer’s name\"\n...............................................................................................................\n...................................................................................\nAND Location <= MaxSize\n................................... ............................................\n\"AccountRecord.dat\",\nGETRECORD \"AccountRecord.dat\", Customer\nIF SearchCustomer = Customer.Name THEN\nOUTPUT \"Customer found: \"\nOUTPUT Customer // output customer record\nFoundFlag TRUE\nENDIF\nLocation Location + 1\nENDWHILE\nIF NOT FoundFlag THEN\n..........................................................................................................\nOUTPUT \" \"\nENDIF\n[7]\n© UCLES 2023 9618/32/O/N/23\n13\nBLANK PAGE\n© UCLES 2023 9618/32/O/N/23\n14\nBLANK PAGE\n© UCLES 2023 9618/32/O/N/23\n15\nBLANK PAGE\n© UCLES 2023 9618/32/O/N/23\n16\nBLANK PAGE\nPermission to reproduce items where third‑party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer‑related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright"
    },
    {
      "id": "9618-2023-on-33-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2023-on-33-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 5
      },
      "text_excerpt": "Real numbers are stored in a computer using floating-point representation with: 1\n• 12 bits for the mantissa\n• 4 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nWrite the normalised floating-point representation of +65.25 in this system. (a)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nExplain the problem that will occur in storing the normalised floating-point representation of (b)\n+65.20 in this system.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2023-on-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          3
        ],
        "marks": 6
      },
      "text_excerpt": "Draw line to connect protocol to its most appropriate use. 2 (a) one each\nProtocol Use\nto provide peer-to-peer file sharing\nHTTP\nwhen retrieving email messages from a\nmail server over a TCP/IP connection\nBitTorrent\nwhen transmitting hypertext documents\nSMTP\nto map MAC addresses onto IP addresses\nIMAP\nwhen sending email messages towards\nthe intended destination\n[4]\nOutline the purpose of the in the TCP / IP protocol suite. (b) Link layer\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-on-33-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Describe what is meant by and data types. 3 enumerated pointer\nEnumerated ......................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nPointer ..............................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q04",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Describe sequential and random methods of file organisation. 4 (a)\nSequential file organisation .......................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nRandom file organisation ..........................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nOutline the process of sequential access for serial and sequential files. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2023-on-33-q05",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-33-q05-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-33-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q05",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 4
      },
      "text_excerpt": "Describe the features of SISD and MIMD computer architectures. 5\nSISD .................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\nMIMD ................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n[4]\n© UCLES 2023 9618/33/O/N/23\n5\nBLANK PAGE\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q06",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-33-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2023-on-33-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "This diagram represents a logic circuit. 6\nA\nB\nZ\nC\nD\nComplete the truth table for the given logic circuit. (a)\nWorking space\nA B C D Z\n0 0 0 0\n0 0 0 1\n0 0 1 0\n0 0 1 1\n0 1 0 0\n0 1 0 1\n0 1 1 0\n0 1 1 1\n1 0 0 0\n1 0 0 1\n1 0 1 0\n1 0 1 1\n1 1 0 0\n1 1 0 1\n1 1 1 0\n1 1 1 1\n[3]\n© UCLES 2023 9618/33/O/N/23\n7\nSimplify the given Boolean expression using Boolean algebra. (b)\nShow your working.\nA.B.C.D + A.B.C.D + A.B.C.D + A.B.C.D Y =\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]"
    },
    {
      "id": "9618-2023-on-33-q07",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2023-on-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q07",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 5
      },
      "text_excerpt": "A student buys a new computer. 7 (a)\nState benefit to the student of a user interface give an example. one and\nBenefit ......................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nExample ....................................................................................................................................\n...................................................................................................................................................\n[2]\nTwo of the process states are the running state and the ready state. (b)\nIdentify process state. one other\n............................................................................................................................................. [1]\nOutline conditions under which a process could change from the running state to the ready (c)\nstate.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q08",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-33-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 8
      },
      "text_excerpt": "A pseudocode algorithm finds a customer account record in a random file and outputs it. The 8 (a)\nrecords are stored using the user-defined data type .\nTAccount\nTYPE TAccount\nDECLARE AccountNumber : INTEGER\nDECLARE LastName : STRING\nDECLARE FirstName : STRING\nDECLARE Address : STRING\nDECLARE ContactNumber : STRING\nENDTYPE\nComplete the file handling pseudocode.\nThe function takes the customer account number as a parameter, calculates and\nHash()\nreturns the hash value.\nDECLARE Customer : TAccount\nDECLARE Location : INTEGER\nDECLARE AccountFile : STRING\n..................................................................................................\n\"AccountRecords.dat\"\n............................................................... ..........................................................\nAccountFile\nOUTPUT \"Please enter an account number\"\nINPUT Customer.AccountNumber\n..............................................................................................................)\nHash( Location\n..................................................................................................................... ,\nSEEK Location\n............................................................. ..........................................................\nAccountFile,\nOUTPUT Customer // output customer record\nCLOSEFILE AccountFile\n[5]\nDefine the term handling. (b) exception\n...................................................................................................................................................\n............................................................................................................................................. [1]\nState possible causes of an exception. (c) two\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q09",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2023-on-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 9
      },
      "text_excerpt": "Write the infix expression for this Reverse Polish Notation (RPN) expression: 9 (a) (i)\n5 2 – 5 4 + * 9 /\n...........................................................................................................................................\n..................................................................................................................................... [2]\nShow how the contents of the following stack will change as the RPN expression in (ii)\npart is evaluated. (a)(i)\n[4]\nExplain how a stack can be used to evaluate RPN expressions. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q10",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-33-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-33-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 10
      },
      "text_excerpt": "A stack is to be set up using the information in the table. 10\nIdentifier Data type Description\npoints to the bottom of the stack\nBasePointer INTEGER\npoints to the top of the stack\nTopPointer INTEGER\n1D array to implement the stack\nStack REAL\nA constant, with identifier , limits the size of the stack to 25 items.\nCapacity\nWrite the for the required declarations. (a) pseudocode\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nComplete the pseudocode function to pop an item from . (b)\nPop() Stack\n// popping an item from the stack\n...............................................................................\nFUNCTION Pop()\nDECLARE Item : REAL\n0 Item\n...............................................................................\nBasePointer THEN\n...............................................................................\nItem\n...............................................................................\nTopPointer\nELSE\nOUTPUT \"The stack is empty – error\"\nENDIF\n...............................................................................\nENDFUNCTION\n[5]\n© UCLES 2023 9618/33/O/N/23\n11\nCompare and contrast the queue and stack Abstract Data Types (ADT). (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q11",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-33-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2023-on-33-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "A programming language is used to represent subjects that students can choose to 11 declarative\nstudy.\nStudents must choose two subjects.\n01 subject(mathematics).\n02 subject(physics).\n03 subject(chemistry).\n04 subject(computer_science).\n05 subject(geography).\n06 subject(history).\n07 subject(english).\n08 subject(biology).\n09 student(tomaz).\n10 student(josephine).\n11 student(elspeth).\n12 student(nico).\n13 student(teresa).\n14 student(pietre).\n15 choice1(tomaz, mathematics).\n16 choice1(teresa, chemistry).\n17 choice1(pietre, mathematics).\n18 choice1(nico, mathematics).\n19 choice1(elspeth, chemistry).\n20 choice2(tomaz, computer_science).\n21 choice2(nico, geography).\nThese clauses have the meanings:\nClause Meaning\nMathematics is a subject.\n01\nTomaz is a student.\n09\nTomaz has chosen mathematics as his first choice.\n15\nTomaz has chosen computer science as his second choice.\n20\n© UCLES 2023 9618/33/O/N/23\n13\nAnthony is a student who would like to study history and geography. (a)\nWrite additional clauses to represent this information.\n.............................................................................................................................................\n22\n.............................................................................................................................................\n23\n.............................................................................................................................................\n24\n[3]\nUsing the variable , the goal: (b)\nX\nchoice1(X, chemistry)\nreturns\nX = teresa, elspeth\nWrite the result returned by the goal:\nchoice1(X, mathematics)\n..................................................................................................................................... [1]\nX =\nStudents must choose two different subjects such that: (c)\nN may choose S, if N is a student and S is a subject and N has not chosen S as the first\nchoice.\nWrite this as a rule.\nmay_choose_subject(N, S)\n.............................................................................................................................................\nIF\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-33-q12",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 12,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_33.pdf?download=true",
      "source_pages": [
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-33-q12-p01.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-33-q12-p02.png",
        "9618-topic-18-artificial-intelligence/assets/9618-2023-on-33-q12-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-33-q12",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_33.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 4
      },
      "text_excerpt": "Artificial neural networks have played a significant role in the development of machine learning. 12\nExplain what is meant by the term network. artificial neural\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [4]\n© UCLES 2023 9618/33/O/N/23\n15\nBLANK PAGE\n© UCLES 2023 9618/33/O/N/23\n16\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2023 9618/33/O/N/23"
    },
    {
      "id": "9618-2023-on-41-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 16,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-on-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 16
      },
      "text_excerpt": "This iterative pseudocode algorithm for the function takes a string as a 1\nIterativeVowels()\nparameter and counts the number of lower-case vowels in this string.\nThe vowels are the letters a, e, i, o and u.\nFUNCTION IterativeVowels(Value : STRING) RETURNS INTEGER\nDECLARE Total : INTEGER\nDECLARE LengthString : INTEGER\nDECLARE FirstCharacter : CHAR\n←\n0 Total\n←\nLengthString LENGTH(Value)\n←\nFOR X 0 TO LengthString - 1\n←\nFirstCharacter MID(Value, 0, 1)\nIF FirstCharacter = 'a' OR FirstCharacter = 'e' OR\nFirstCharacter = 'i' OR FirstCharacter = 'o' OR\nFirstCharacter = 'u' THEN\n←\nTotal Total + 1\nENDIF\n←\nValue MID(Value, 1, LENGTH(Value)-1)\nNEXT X\nRETURN Total\nENDFUNCTION\nThe pseudocode function returns number of characters from string , starting\nMID(X, Y, Z) Z X\nat the character in position . The first character in a string is in position 0, for example:\nY\nreturns\nMID(\"computer\", 0, 3) \"com\"\nThe pseudocode function returns the number of characters in the string , for\nLENGTH(X) X\nexample:\nreturns 8\nLENGTH(\"computer\")\n© UCLES 2023 9618/41/O/N/23\n3\nWrite program code for the function . (a) (i)\nIterativeVowels()\nSave your program as Question1_N23.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[5]\nWrite program code to call the function with the parameter (ii)\nIterativeVowels()\nfrom the main program.\n\"house\"\nOutput the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(a)(iii)\n[1]\nRewrite the function as a recursive function with the identifier (b) (i)\nIterativeVowels()\n.\nRecursiveVowels()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[6]\nWrite program code to call the function with the parameter (ii)\nRecursiveVowels()\nfrom the main program.\n\"imagine\"\nOutput the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(b)(iii)\n[1]\n[Turn over © UCLES 2023 9618/41/O/N/23"
    },
    {
      "id": "9618-2023-on-41-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-on-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-on-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2023-on-41-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_41.pdf?download=true",
        "source_pages": [
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24
        ],
        "marks": 29
      },
      "text_excerpt": "A linear queue is implemented using the 1D array, . The index of the first element in the 2\nQueue\narray is 0.\nWrite program code to declare: (a) (i)\n• — a global array with space to store 50 IDs of type string\nQueue\n• — a global variable to point to the first element in the queue,\nHeadPointer\ninitialised to −1\n• — a global variable to point to the next available space in the queue,\nTailPointer\ninitialised to 0.\nSave your program as Question2_N23.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[2]\nThe procedure takes a string parameter. (ii)\nEnqueue()\nIf the queue is full, the procedure outputs a suitable message. If the queue is not full, the\nprocedure inserts the parameter into the queue and updates the relevant pointer(s).\nWrite program code for .\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[4]\nThe function checks if the queue is empty. (iii)\nDequeue()\nIf the queue is empty, the function outputs a suitable message and returns the string\n.\n\"Empty\"\nIf the queue is not empty, the function returns the first element in the queue and updates\nthe relevant pointer(s).\nWrite program code for .\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(iii)\n[4]\n© UCLES 2023 9618/41/O/N/23\n5\nA shop sells computer games. Each game has a unique identifier (ID) of string data type. (b)\nThe text file contains a list of game IDs.\nQueueData.txt\nThe procedure reads the data from the text file and inserts each item of data\nReadData()\ninto the array .\nQueue\nWrite program code for the procedure .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[6]\nSome game IDs appear in the text file more than once. (c)\nThe program needs to total the number of times each game ID appears in the text file.\nThe record structure has the following fields:\nRecordData\n• — a string to store the game ID\nID\n• — an integer to store the total number of times that game ID appears in the text\nTotal\nfile.\nWrite program code to declare the record structure . (i)\nRecordData\nIf you are writing in Python, include attribute declarations as comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)(i)\n[2]\nThe global 1D array stores up to 50 items of type . (ii)\nRecords RecordData\nThe global variable stores the number of records currently in the array\nNumberRecords\nand is initialised to 0.\nRecords\nWrite program code to declare and .\nRecords NumberRecords\nIf you are writing in Python, include attribute declarations as comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)(ii)\n[2]\n[Turn over © UCLES 2023 9618/41/O/N/23\n6\nThe pseudocode algorithm for the procedure : (iii)\nTotalData()\n• uses to remove an ID from the queue\nDequeue()\n• checks whether a with the returned ID exists in\nRecordData Records\n• increments the total for that I"
    },
    {
      "id": "9618-2023-on-41-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_41.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-on-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-on-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-on-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-on-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_41.pdf?download=true",
        "source_pages": [
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37
        ],
        "marks": 30
      },
      "text_excerpt": "A computer game is written using object-oriented programming. 3\nThe game has multiple characters that can move around the screen.\nThe class stores data about the characters. Each character has a name, a current X\nCharacter\n(horizontal) position and a current Y (vertical) position.\nCharacter\nstores the name of the character as a string Name : STRING\nstores the X position as an integer XPosition : INTEGER\nstores the Y position as an integer YPosition : INTEGER\ninitialises , and to its Constructor() Name XPosition YPosition\nparameter values\nreturns the X position GetXPosition()\nreturns the Y position GetYPosition()\nadds the parameter to the X position SetXPosition()\nvalidates that the new X position is between 0 and 10 000\ninclusive\nadds the parameter to the Y position SetYPosition()\nvalidates that the new Y position is between 0 and 10 000\ninclusive\ntakes a direction as a parameter and calls either Move()\nor with an integer value\nSetXPosition SetYPosition\nWrite program code to declare the class and its constructor. (a) (i)\nCharacter\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_N23.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[4]\n© UCLES 2023 9618/41/O/N/23\n9\nThe get methods and each return the relevant (ii)\nGetXPosition() GetYPosition()\nattribute.\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\nThe set methods and each take a value as a (iii)\nSetXPosition() SetYPosition()\nparameter and add this to the current X or Y position.\nIf the new value exceeds 10 000, it is limited to 10 000.\nIf the new value is below 0, it is limited to 0.\nWrite program code for the set methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iii)\n[4]\nThe method takes a string parameter: , , or . (iv)\nMove() \"up\" \"down\" \"left\" \"right\"\nThe table shows the change each direction will make to the X or Y position.\nUse the appropriate method to change the position value.\nDirection Value change\nup Y position + 10\ndown Y position − 10\nleft X position − 10\nright X position + 10\nWrite program code for .\nMove()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iv)\n[4]\nWrite program code to declare a new instance of with the identifier . (b)\nCharacter Jack\nThe starting X position is 50 and the starting Y position is 50, the character’s name is Jack.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[2]\n[Turn over © UCLES 2023 9618/41/O/N/23\n10\nThe class inherits from the class . (c)\nBikeCharacter Character\nBikeCharacter\ntakes , and as parameters Constructor() Name XPosition YPosition\ncalls its parent class constructor with the appropriate values\noverrides the method from the parent class"
    },
    {
      "id": "9618-2023-on-42-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 27,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-on-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2023-on-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2023-on-42-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16
        ],
        "marks": 27
      },
      "text_excerpt": "A program stores lower-case letters in two stacks. 1\nOne stack stores vowels (a, e, i, o, u) and one stack stores consonants (letters that are not\nvowels).\nEach stack is implemented as a 1D array.\nWrite program code to declare two 1D global arrays: and . (a) (i)\nStackVowel StackConsonant\nEach array needs to store up to 100 letters. The index of the first element in each array is 0.\nIf you are writing in Python, include declarations using comments.\nSave your program as Question1_N23.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[2]\nThe global variable is a pointer that stores the index of the next free space in (ii)\nVowelTop\n.\nStackVowel\nThe global variable is a pointer that stores the index of the next free\nConsonantTop\nspace in .\nStackConsonant\nand are both initialised to 0.\nVowelTop ConsonantTop\nWrite program code to declare and initialise the two variables.\nIf you are writing in Python, include declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[1]\n© UCLES 2023 9618/42/O/N/23\n3\nThe procedure takes one letter as a parameter. (b) (i)\nPushData()\nIf the parameter is a vowel, it is pushed onto and the relevant pointer\nStackVowel\nupdated.\nIf the stack is full, a suitable message is output.\nIf the parameter is a consonant, it is pushed onto and the relevant\nStackConsonant\npointer updated.\nIf the stack is full, a suitable message is output.\nYou do need to validate that the parameter is a letter. not\nWrite program code for .\nPushData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[6]\nThe file stores 100 lower-case letters. (ii)\nStackData.txt\nThe procedure reads each letter from the file and uses to\nReadData() PushData()\npush each letter onto its appropriate stack.\nUse appropriate exception handling if the file does not exist.\nWrite program code for .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[6]\nThe function removes and returns the data at the top of and (c)\nPopVowel() StackVowel\nupdates the relevant pointer(s).\nThe function removes and returns the data from the top of\nPopConsonant() StackConsonant\nand updates the relevant pointer(s).\nIf either stack is empty, the string must be returned.\n\"No data\"\nWrite program code to declare and .\nPopVowel() PopConsonant()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[5]\n[Turn over © UCLES 2023 9618/42/O/N/23\n4\nThe program first needs to call and then: (d)\nReadData()\n1. prompt the user to input their choice of vowel or consonant\n2. take, as input, the user’s choice\n3. depending on the user’s choice, call or and store the\nPopVowel() PopConsonant()\nreturn value.\nThe three steps are repeated until 5 letters have been successfully returned and stored.\nIf either stack is empty at any stage, an appropriate message must be output.\nOnce 5 letters have been succe"
    },
    {
      "id": "9618-2023-on-42-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_42.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-on-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-on-42-q02-p03.png",
        "9618-practical-programming/assets/9618-2023-on-42-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_42.pdf?download=true",
        "source_pages": [
          17,
          18,
          19,
          20,
          21
        ],
        "marks": 17
      },
      "text_excerpt": "An integer is said to be divisible by another integer if the result of the division is also an integer. 2\nFor example:\n10 is divisible by 1, 2, 5 and 10:\n• 10 ÷ 1 = 10\n• 10 ÷ 2 = 5\n• 10 ÷ 5 = 2\n• 10 ÷ 10 = 1\n10 is not divisible by 4:\n• 10 ÷ 4 = 2.5\n1, 2, 5 and 10 are said to be the divisors of 10.\nThe iterative function totals all the divisors of its integer parameter and\nIterativeCalculate()\nreturns this total.\nExample 1: if the parameter is 10, the total will be 18 (1 + 2 + 5 + 10) .\nExample 2: if the parameter is 4, the total will be 7 (1 + 2 + 4) .\nA pseudocode algorithm for is shown.\nIterativeCalculate()\nFUNCTION IterativeCalculate(Number : INTEGER) RETURNS INTEGER\nDECLARE Total : Integer\nDECLARE ToFind : Integer\n←\nNumber ToFind\n←\n0 Total\nWHILE Number <> 0\nIF ToFind MODULUS Number = 0 THEN\n←\nTotal + Number Total\nENDIF\n←\nNumber - 1 Number\nENDWHILE\nRETURN Total\nENDFUNCTION\nThe operator calculates the remainder when one number is divided by another.\nMODULUS\n© UCLES 2023 9618/42/O/N/23\n7\nWrite program code for . (a) (i)\nIterativeCalculate()\nSave your program as Question2_N23.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[5]\nWrite program code to call with 10 as the parameter and (ii)\nIterativeCalculate()\noutput the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 2(a)(iii)\n[1]\nhas been rewritten as the recursive function . (b)\nIterativeCalculate() RecursiveValue()\nA pseudocode algorithm for is given. The function is incomplete.\nRecursiveValue()\nFUNCTION RecursiveValue(Number : INTEGER, ToFind : INTEGER)\nRETURNS INTEGER\nIF Number = .............. THEN\nRETURN 0\nELSE\nIF ToFind .............. Number = 0 THEN\nRETURN .............. + RecursiveValue(Number - 1, ToFind)\nELSE\n.............. RecursiveValue(Number - 1, ..............)\nENDIF\nENDIF\nENDFUNCTION\n[Turn over © UCLES 2023 9618/42/O/N/23\n8\nWrite program code for . (i)\nRecursiveValue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(i)\n[7]\nWrite program code to call with 50 as the first parameter and 50 (ii)\nRecursiveValue()\nas the second parameter and output the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 2(b)(iii)\n[1]\n© UCLES 2023 9618/42/O/N/23\n9\nBLANK PAGE\n[Turn over © UCLES 2023 9618/42/O/N/23"
    },
    {
      "id": "9618-2023-on-42-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_42.pdf?download=true",
      "source_pages": [
        10,
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p05.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p06.png",
        "9618-practical-programming/assets/9618-2023-on-42-q03-p07.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_42.pdf?download=true",
        "source_pages": [
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34
        ],
        "marks": 31
      },
      "text_excerpt": "A computer game is written using object-oriented programming. 3\nThe game has multiple characters.\nThe class stores data about the game characters. Each character has a name, date\nCharacter\nof birth, intelligence value and speed value.\nCharacter\nstores the name of the character CharacterName : STRING\nstores the date of birth of the character DateOfBirth : DATE\nstores the intelligence value of the character Intelligence : REAL\nstores the speed value of the character Speed : INTEGER\ninitialises , , Constructor() CharacterName DateOfBirth\nand to the parameter values\nIntelligence Speed\nassigns the value of the parameter to SetIntelligence() Intelligence\nreturns the value of GetIntelligence() Intelligence\nreturns the name of the character GetName()\ncalculates and returns the age of the character as an integer ReturnAge()\nincreases the value of by 10% Learn() Intelligence\nWrite program code to declare the class and its constructor. (a) (i)\nCharacter\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_N23.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[5]\nThe get methods and return the attribute values. (ii)\nGetIntelligence() GetName()\nWrite program code for the methods and .\nGetIntelligence() GetName()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\n© UCLES 2023 9618/42/O/N/23\n11\nThe method assigns the value of its parameter to the attribute. (iii)\nSetIntelligence()\nWrite program code for .\nSetIntelligence()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iii)\n[2]\nThe method increases the current value of by 10%. (iv)\nLearn() Intelligence\nWrite program code for .\nLearn()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iv)\n[1]\nThe method calculates and returns the age of the character in years as (v)\nReturnAge()\nan integer.\nAssume that the current year is 2023 and use the year from the date of birth for the only\ncalculation. For example, the method returns 18 if the character was born on any date in\n2005.\nWrite program code for the method .\nReturnAge()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(v)\n[2]\nWrite program code to create a new instance of with the identifier (b) (i)\nCharacter\n.\nFirstCharacter\nThe name of the character is Royal, date of birth is 1 January 2019, intelligence is 70\nand speed is 30.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(i)\n[2]\nWrite program code to call the method for the character created in part 3(b)(i). (ii)\nLearn()\nOutput the name, age and intelligence of the character in an appropriate message.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(ii)\n[3]\n[Turn over © UCLES 2023"
    },
    {
      "id": "9618-2023-on-43-q01",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 16,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2023-on-43-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8
        ],
        "marks": 16
      },
      "text_excerpt": "This iterative pseudocode algorithm for the function takes a string as a 1\nIterativeVowels()\nparameter and counts the number of lower-case vowels in this string.\nThe vowels are the letters a, e, i, o and u.\nFUNCTION IterativeVowels(Value : STRING) RETURNS INTEGER\nDECLARE Total : INTEGER\nDECLARE LengthString : INTEGER\nDECLARE FirstCharacter : CHAR\n←\n0 Total\n←\nLengthString LENGTH(Value)\n←\nFOR X 0 TO LengthString - 1\n←\nFirstCharacter MID(Value, 0, 1)\nIF FirstCharacter = 'a' OR FirstCharacter = 'e' OR\nFirstCharacter = 'i' OR FirstCharacter = 'o' OR\nFirstCharacter = 'u' THEN\n←\nTotal Total + 1\nENDIF\n←\nValue MID(Value, 1, LENGTH(Value)-1)\nNEXT X\nRETURN Total\nENDFUNCTION\nThe pseudocode function returns number of characters from string , starting\nMID(X, Y, Z) Z X\nat the character in position . The first character in a string is in position 0, for example:\nY\nreturns\nMID(\"computer\", 0, 3) \"com\"\nThe pseudocode function returns the number of characters in the string , for\nLENGTH(X) X\nexample:\nreturns 8\nLENGTH(\"computer\")\n© UCLES 2023 9618/43/O/N/23\n3\nWrite program code for the function . (a) (i)\nIterativeVowels()\nSave your program as Question1_N23.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[5]\nWrite program code to call the function with the parameter (ii)\nIterativeVowels()\nfrom the main program.\n\"house\"\nOutput the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(a)(iii)\n[1]\nRewrite the function as a recursive function with the identifier (b) (i)\nIterativeVowels()\n.\nRecursiveVowels()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[6]\nWrite program code to call the function with the parameter (ii)\nRecursiveVowels()\nfrom the main program.\n\"imagine\"\nOutput the return value.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(b)(iii)\n[1]\n[Turn over © UCLES 2023 9618/43/O/N/23"
    },
    {
      "id": "9618-2023-on-43-q02",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_43.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2023-on-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2023-on-43-q02-p03.png",
        "9618-practical-programming/assets/9618-2023-on-43-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_43.pdf?download=true",
        "source_pages": [
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24
        ],
        "marks": 29
      },
      "text_excerpt": "A linear queue is implemented using the 1D array, . The index of the first element in the 2\nQueue\narray is 0.\nWrite program code to declare: (a) (i)\n• — a global array with space to store 50 IDs of type string\nQueue\n• — a global variable to point to the first element in the queue,\nHeadPointer\ninitialised to −1\n• — a global variable to point to the next available space in the queue,\nTailPointer\ninitialised to 0.\nSave your program as Question2_N23.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[2]\nThe procedure takes a string parameter. (ii)\nEnqueue()\nIf the queue is full, the procedure outputs a suitable message. If the queue is not full, the\nprocedure inserts the parameter into the queue and updates the relevant pointer(s).\nWrite program code for .\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[4]\nThe function checks if the queue is empty. (iii)\nDequeue()\nIf the queue is empty, the function outputs a suitable message and returns the string\n.\n\"Empty\"\nIf the queue is not empty, the function returns the first element in the queue and updates\nthe relevant pointer(s).\nWrite program code for .\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(iii)\n[4]\n© UCLES 2023 9618/43/O/N/23\n5\nA shop sells computer games. Each game has a unique identifier (ID) of string data type. (b)\nThe text file contains a list of game IDs.\nQueueData.txt\nThe procedure reads the data from the text file and inserts each item of data\nReadData()\ninto the array .\nQueue\nWrite program code for the procedure .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[6]\nSome game IDs appear in the text file more than once. (c)\nThe program needs to total the number of times each game ID appears in the text file.\nThe record structure has the following fields:\nRecordData\n• — a string to store the game ID\nID\n• — an integer to store the total number of times that game ID appears in the text\nTotal\nfile.\nWrite program code to declare the record structure . (i)\nRecordData\nIf you are writing in Python, include attribute declarations as comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)(i)\n[2]\nThe global 1D array stores up to 50 items of type . (ii)\nRecords RecordData\nThe global variable stores the number of records currently in the array\nNumberRecords\nand is initialised to 0.\nRecords\nWrite program code to declare and .\nRecords NumberRecords\nIf you are writing in Python, include attribute declarations as comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)(ii)\n[2]\n[Turn over © UCLES 2023 9618/43/O/N/23\n6\nThe pseudocode algorithm for the procedure : (iii)\nTotalData()\n• uses to remove an ID from the queue\nDequeue()\n• checks whether a with the returned ID exists in\nRecordData Records\n• increments the total for that I"
    },
    {
      "id": "9618-2023-on-43-q03",
      "subject": "9618",
      "year": 2023,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_qp_43.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2023-oct-nov/qp/9618_w23_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2023-on-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2023-on-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2023-on-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2023-on-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2023-on-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2023-on-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2023-oct-nov/ms/9618_w23_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2023-Oct-Nov/9618_w23_ms_43.pdf?download=true",
        "source_pages": [
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37
        ],
        "marks": 30
      },
      "text_excerpt": "A computer game is written using object-oriented programming. 3\nThe game has multiple characters that can move around the screen.\nThe class stores data about the characters. Each character has a name, a current X\nCharacter\n(horizontal) position and a current Y (vertical) position.\nCharacter\nstores the name of the character as a string Name : STRING\nstores the X position as an integer XPosition : INTEGER\nstores the Y position as an integer YPosition : INTEGER\ninitialises , and to its Constructor() Name XPosition YPosition\nparameter values\nreturns the X position GetXPosition()\nreturns the Y position GetYPosition()\nadds the parameter to the X position SetXPosition()\nvalidates that the new X position is between 0 and 10 000\ninclusive\nadds the parameter to the Y position SetYPosition()\nvalidates that the new Y position is between 0 and 10 000\ninclusive\ntakes a direction as a parameter and calls either Move()\nor with an integer value\nSetXPosition SetYPosition\nWrite program code to declare the class and its constructor. (a) (i)\nCharacter\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_N23.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[4]\n© UCLES 2023 9618/43/O/N/23\n9\nThe get methods and each return the relevant (ii)\nGetXPosition() GetYPosition()\nattribute.\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\nThe set methods and each take a value as a (iii)\nSetXPosition() SetYPosition()\nparameter and add this to the current X or Y position.\nIf the new value exceeds 10 000, it is limited to 10 000.\nIf the new value is below 0, it is limited to 0.\nWrite program code for the set methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iii)\n[4]\nThe method takes a string parameter: , , or . (iv)\nMove() \"up\" \"down\" \"left\" \"right\"\nThe table shows the change each direction will make to the X or Y position.\nUse the appropriate method to change the position value.\nDirection Value change\nup Y position + 10\ndown Y position − 10\nleft X position − 10\nright X position + 10\nWrite program code for .\nMove()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iv)\n[4]\nWrite program code to declare a new instance of with the identifier . (b)\nCharacter Jack\nThe starting X position is 50 and the starting Y position is 50, the character’s name is Jack.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[2]\n[Turn over © UCLES 2023 9618/43/O/N/23\n10\nThe class inherits from the class . (c)\nBikeCharacter Character\nBikeCharacter\ntakes , and as parameters Constructor() Name XPosition YPosition\ncalls its parent class constructor with the appropriate values\noverrides the method from the parent class"
    },
    {
      "id": "9618-2024-mj-31-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-mj-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "Real numbers are stored in a computer system using floating-point representation with: 1\n• 10 bits for the mantissa\n• 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nCalculate the denary value of the given normalised floating-point number. (a)\nShow your working.\nMantissa Exponent\n0 1 0 0 1 1 1 1 0 0 0 0 1 0 0 1\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nAnswer ......................................................................................................................................\n[3]\nCalculate the normalised floating-point representation of –102.75 in this system. (b)\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\n© UCLES 2024 9618/31/M/J/24"
    },
    {
      "id": "9618-2024-mj-31-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-mj-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "The TCP / IP protocol suite has four layers: 2\nTransport, Application, Link, Internet\nComplete the diagram to show the correct order for these layers. (a)\n[2]\nDescribe the function of the Transport layer. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nOutline protocol that is associated with the Application layer. (c) one\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2024-mj-31-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-31-q03-p01.png",
        "9618-topic-20-further-programming/assets/9618-2024-mj-31-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 7
      },
      "text_excerpt": "Explain what is meant by and data types. 3 (a) non-composite composite\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2024 9618/31/M/J/24\n4\nWrite statements to declare the record data type to hold data (b) pseudocode\nFootballClub\nabout football clubs in a league, to include:\n• name of team\n• date team joined the league\n• main telephone number\n• name of the manager\n• number of members\n• current position in the league.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2024-mj-31-q04",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 5
      },
      "text_excerpt": "Describe the sequential method of file access. 4 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how the sequential method of file access is applied to files with serial organisation (b)\nand to files with sequential organisation.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2024 9618/31/M/J/24"
    },
    {
      "id": "9618-2024-mj-31-q05",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 9
      },
      "text_excerpt": "Write this Reverse Polish Notation (RPN) in infix form: 5 (a)\n5 2 + 9 3 - / 3 *\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nWrite this infix expression in RPN: (b)\n((7 + 3) - (2 * 8)) / 6\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nEvaluate this RPN expression: (c)\na b - c d + * e /\nwhen\nand\na = 17, b = 5, c = 7, d = 3 e = 10\nShow the changing contents of the stack as the RPN expression is evaluated.\n[4]\n[Turn over © UCLES 2024 9618/31/M/J/24"
    },
    {
      "id": "9618-2024-mj-31-q06",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-31-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-31-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 10
      },
      "text_excerpt": "The diagram shows a logic circuit. 6\nQ A\nP R\nB Z\nS\nC\nComplete the truth table for the given logic circuit. (a)\nShow your working.\nWorking space\nA B C P Q R S Z\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[3]\nWrite the Boolean expression that corresponds to the logic circuit as a sum-of-products. (b)\n............................................................................................................................................ Z =\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n© UCLES 2024 9618/31/M/J/24\n7\nComplete the Karnaugh map (K-map) for the Boolean expression: (c) (i)\nA.B.C + A.B.C + A.B.C + A.B.C + A.B.C + A.B.C\nBC\n00 01 11 10\nA\n0\n1\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (ii)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to part as a simplified (iii) (c)(ii)\nsum-of-products.\n...........................................................................................................................................\n..................................................................................................................................... [1]"
    },
    {
      "id": "9618-2024-mj-31-q07",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2024-mj-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q07",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 5
      },
      "text_excerpt": "Describe what is meant by a digital certificate. 7 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nExplain the role of a digital certificate in creating a digital signature. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2024 9618/31/M/J/24"
    },
    {
      "id": "9618-2024-mj-31-q08",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-31-q08-p01.png",
        "9618-topic-20-further-programming/assets/9618-2024-mj-31-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q08",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 8
      },
      "text_excerpt": "A programming language is used to represent the features that are available and the 8 declarative\nfeatures that are unavailable on different body styles of a car.\n01 feature(sunroof).\n02 feature(automatic_tailgate).\n03 feature(heated_seats).\n04 feature(extra_seats).\n05 feature(reversing_camera).\n06 feature(dashboard_camera).\n07 feature(air_conditioning).\n08 feature(heated_windscreen).\n09 feature(satnav).\n10 bodystyle(saloon).\n11 bodystyle(hatchback).\n12 bodystyle(estate).\n13 bodystyle(minivan).\n14 bodystyle(convertible).\n15 available(sunroof, hatchback).\n16 available(sunroof, minivan).\n17 available(reversing_camera, hatchback).\n18 available(extra_seats, minivan).\n19 available(reversing_camera, saloon).\n20 unavailable(sunroof, convertible).\n21 unavailable(automatic_tailgate, saloon).\n22 unavailable(extra_seats, hatchback).\nThese clauses have the meanings:\nClause Meaning\nSunroof is a feature. 01\nSaloon is a body style. 10\nSunroof is available on a hatchback. 15\nSunroof is unavailable on a convertible. 20\nSliding doors is a feature that is available on a minivan but unavailable on a hatchback. (a)\nWrite additional clauses to represent this information.\n.............................................................................................................................................\n23\n.............................................................................................................................................\n24\n.............................................................................................................................................\n25\n[3]\n© UCLES 2024 9618/31/M/J/24\n9\nUsing the variable , the goal: (b)\nOptions\navailable(Options, saloon)\nreturns\nOptions = reversing_camera\nWrite the result returned by the goal:\navailable(Options, hatchback)\n........................................................................................................................ [1]\nOptions =\nmay be available for if is a feature and is a body style and is unavailable for that (c) not\nF B F B F\nbody style.\nWrite this as a rule:\nmay_choose_option(F, B)\n.............................................................................................................................................\nIF\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2024-mj-31-q09",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2024-mj-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 3
      },
      "text_excerpt": "Explain what is meant by in relation to Artificial Intelligence (AI). 9 Deep Learning\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [3]\n[Turn over © UCLES 2024 9618/31/M/J/24"
    },
    {
      "id": "9618-2024-mj-31-q10",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-mj-31-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-mj-31-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 8
      },
      "text_excerpt": "State a condition that must be true for an array to be searchable for a binary search. 10 (a)\n...................................................................................................................................................\n............................................................................................................................................. [1]\nComplete the given pseudocode to find an item in a 1D array of type using a (b)\nNames STRING\nbinary search.\nDECLARE Names : ARRAY[1:100000] OF STRING\nDECLARE TopOfList : INTEGER\nDECLARE EndOfList : INTEGER\nDECLARE CurrentItem : INTEGER\nDECLARE ToFind : STRING\nDECLARE Found : BOOLEAN\nDECLARE NotInList : BOOLEAN\n←\n1 TopOfList\n←\n100000 EndOfList\nOUTPUT \"Which name do you wish to find? \"\nINPUT ToFind\n...................................................................................................................................................\n←\nFALSE NotInList\n................................................ ................................................\nWHILE AND\n←\n(TopOfList + EndOfList) DIV 2 CurrentItem\n...........................................................................................................\nIF THEN\n←\nTRUE Found\nELSE\nIF TopOfList >= EndOfList THEN\n...........................................................................................................\nELSE\nIF ToFind > Names[CurrentItem] THEN\n...........................................................................................................\nELSE\n←\nCurrentItem – 1 EndOfList\nENDIF\nENDIF\nENDIF\nENDWHILE\nIF Found = TRUE THEN\nOUTPUT \"Item found at position \", CurrentItem, \" in array\"\nELSE\nOUTPUT \"Item not in array\"\nENDIF\n[5]\n© UCLES 2024 9618/31/M/J/24\n11\nDescribe the performance of a binary search in relation to the number of data items in the (c)\narray being searched. Refer to Big O notation in your answer.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]"
    },
    {
      "id": "9618-2024-mj-31-q11",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_31.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-31-q11-p01.png",
        "9618-topic-16-system-software/assets/9618-2024-mj-31-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-31-q11",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_31.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 8
      },
      "text_excerpt": "Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are 11\ntwo types of processor.\nState features of RISC processors. (a) two\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nOutline the process of interrupt handling as it could be applied to RISC or CISC processors. (b)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\nExplain how pipelining affects interrupt handling for RISC processors. (c)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2024 9618/31/M/J/24\n12\nBLANK PAGE\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clea"
    },
    {
      "id": "9618-2024-mj-32-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-mj-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 5
      },
      "text_excerpt": "Describe the effect of changing the allocation of bits used for the mantissa and for the 1 (a)\nexponent in a floating-point number with a fixed total number of bits.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nReal numbers are stored in a computer, using floating-point representation with: (b)\n• 12 bits for the mantissa\n• 4 bits for the exponent\n• two’s complement form for both the mantissa and exponent.\nCalculate the normalised floating-point representation of +54.8125 in this system.\nShow your working.\nMantissa Exponent\nWorking .....................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-mj-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 7
      },
      "text_excerpt": "Outline why protocols are essential for communication between computers. 2 (a)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nState the names of different protocols associated with the sending and receiving of (b) two\nemails between computers.\nSending ....................................................................................................................................\nReceiving ..................................................................................................................................\n[2]\nExplain the meaning of the phrase: (c)\nBitTorrent protocol provides peer-to-peer file sharing.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n[Turn over © UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 7
      },
      "text_excerpt": "Explain what is meant by the term and give an example of a 3 (a) non-composite data type\nnon-composite data type.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nExample ....................................................................................................................................\n[3]\nWrite statements to declare the set data type to hold this set of (b) pseudocode\nEvenNumbers\neven numbers between 2 and 12:\n2, 4, 6, 8, 10, 12\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q04",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2024-mj-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q04",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 4
      },
      "text_excerpt": "Sheila has a customer called Fred. Fred wants to send Sheila a confidential document as part of a 4\ntransaction.\nExplain how Fred uses asymmetric encryption to send his document securely.\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [4]\n[Turn over © UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q05",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 9
      },
      "text_excerpt": "Write this infix expression in Reverse Polish Notation (RPN): 5 (a)\n(7 – 2 + 8) / (9 – 5)\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nEvaluate this RPN expression: (b)\na d + a b + c - *\nwhen\n, , and\na = 6 b = 3 c = 7 d = 9\nShow the changing contents of the stack as the RPN expression is evaluated.\n[4]\nWrite this RPN expression in infix form: (c)\nb a c - + d b + * c /\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q06",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-32-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-32-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          6,
          7,
          8
        ],
        "marks": 10
      },
      "text_excerpt": "The diagram shows a logic circuit. 6\nP\nA\nS\nQ\nZ B\nT\nR\nC\nComplete the truth table for the given logic circuit. (a)\nShow your working.\nWorking space\nA B C P Q R S T Z\n0 0 0\n0 0 1\n0 1 0\n0 1 1\n1 0 0\n1 0 1\n1 1 0\n1 1 1\n[3]\nWrite the Boolean expression that corresponds to the logic circuit as a sum-of-products. (b)\n............................................................................................................................................ Z =\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\n[Turn over © UCLES 2024 9618/32/M/J/24\n8\nComplete the Karnaugh map (K-map) for this Boolean expression: (c) (i)\n– – – – – – – – –\nA.B.C + A.B.C + A.B.C + A.B.C + A.B.C + A.B.C\nBC\n00 01 11 10\nA\n0\n1\n[2]\nDraw loop(s) around appropriate group(s) in the K-map to produce an optimal (ii)\nsum-of-products. [2]\nWrite the Boolean expression from your answer to part as a simplified (iii) c(ii)\nsum-of-products.\n...........................................................................................................................................\n..................................................................................................................................... [1]"
    },
    {
      "id": "9618-2024-mj-32-q07",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q07",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 6
      },
      "text_excerpt": "Outline what is meant by as a method of file access. 7 (a) direct access\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [2]\nExplain how direct access is used to locate a specific record in sequential files and random (b)\nfiles.\nSequential files .................................................................................................................. (i)\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\nRandom files ..................................................................................................................... (ii)\n...........................................................................................................................................\n...........................................................................................................................................\n..................................................................................................................................... [2]\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q08",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-mj-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 8
      },
      "text_excerpt": "Complete the pseudocode to find an item in a 1D array of type , using a 8 (a)\nWidgets STRING\nsearch. linear\nDECLARE Widgets : ARRAY[1:50000] OF STRING\nDECLARE TopOfList : INTEGER\nDECLARE EndOfList : INTEGER\nDECLARE Count : INTEGER\nDECLARE ToFind : STRING\nDECLARE Found : BOOLEAN\nDECLARE NotInList : BOOLEAN\n1 TopOfList\n50000 EndOfList\nOUTPUT \"Enter the name of the item you wish to find \"\nINPUT ToFind\n…………………………………………………………………………………………………………………………………\nFALSE NotInList\nTopOfList Count\nWHILE …………………………………………………………… AND ………………………………………………………………………\nIF ……………………………………………………………………………………………………………………………… THEN\nTRUE Found\nENDIF\nCount + 1 Count\nIF …………………………………………………………………………………………………………………………… THEN\nTRUE NotInList\nENDIF\nENDWHILE\nIF Found = TRUE THEN\nOUTPUT \"Item found at position \", Count - 1, \" in array\"\nELSE\nOUTPUT \"Item not in array\"\nENDIF\n[4]\nCompare the methods used by the linear and binary search algorithms to find an item in an (b)\narray. Refer to Big O notation in your answer.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]\n[Turn over © UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q09",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 7
      },
      "text_excerpt": "Outline benefits and limitations of a virtual machine. 9 (a) two two\nBenefit 1 ...................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nLimitation 1 ...............................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\nLimitation 2 ...............................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nExplain the roles of the host operating system and the guest operating system as used in a (b)\ncomputer system running a virtual machine.\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [3]\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-32-q10",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-32-q10-p01.png",
        "9618-topic-20-further-programming/assets/9618-2024-mj-32-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q10",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 9
      },
      "text_excerpt": "A programming language is used to allow clients to choose daily activities at the 10 declarative\nbeach.\n01 activity(paddleboarding).\n02 activity(sailing).\n03 activity(rowing).\n04 activity(kayaking).\n05 activity(jetskiing).\n06 client(stevie).\n07 client(antonio).\n08 client(henry).\n09 client(eliza).\n10 client(rebeka).\n11 client(danny).\n12 client(erik).\n13 client(simone).\n14 client(petra).\n15 client(frankie).\n16 choice(petra, rowing).\n17 choice(frankie, sailing).\n18 choice(erik, sailing).\n19 choice(eliza, rowing).\n20 choice(stevie, jetskiing).\n21 choice(henry, sailing).\n22 done(henry, jetskiing).\n23 done(rebeka, jetskiing).\n24 done(antonio, kayaking).\nThese clauses have the meanings:\nClause Meaning\nPaddle boarding is an activity. 01\nStevie is a client. 06\nPetra has chosen rowing. 16\nHenry has already done jet skiing. 22\nJane is a client who would like to choose the activity surfing and she has already done sailing. (a)\nWrite additional clauses to represent this information.\n.............................................................................................................................................\n25\n.............................................................................................................................................\n26\n.............................................................................................................................................\n27\n.............................................................................................................................................\n28\n[4]\n[Turn over © UCLES 2024 9618/32/M/J/24\n12\nUsing the variable , the goal: (b)\nList\nchoice(List, rowing)\nreturns\nList = petra, eliza\nWrite the result returned by the goal:\nchoice(List, sailing)\n.............................................................................................................................. [1]\nList =\nis a client who would like to choose if is an activity and has already done . (c) not\nC A A C A\nWrite this as a rule:\nmay_choose_activity(C, A)\n............................................................................................................................................\nIF\n...................................................................................................................................................\n...................................................................................................................................................\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2024-mj-32-q11",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_32.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2024-mj-32-q11-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-32-q11",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_32.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 3
      },
      "text_excerpt": "Explain what is meant by in relation to Artificial Intelligence. 11 Reinforcement Learning\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n..........................................................................................................................................................\n.................................................................................................................................................... [3]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nAssessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series.\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge.\n© UCLES 2024 9618/32/M/J/24"
    },
    {
      "id": "9618-2024-mj-33-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-mj-33-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:8)(cid:1)(cid:3)(cid:44)\n1 Real numbers are stored in a computer system using floating-point representation with:\nSIHT\n• NI 10 bits for the mantissa\nETIRW • 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the denary value of the given normalised floating-point number.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\n0 1 0 0 1 1 1 1 0 0 0 0 1 0 0 1\nSIHT\nNI\nETIRW\n..................................................................................................................................... Working\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\nAnswer ......................................................................................................................................\n[3]\nNI\nETIRW\n(b) Calculate the normalised floating-point representation of –102.75 in this system.\nTON\nShow your working.\nOD\nMantissa Exponent\nNIGRAM\nSIHT\nWorking .....................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[3]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:213)(cid:250)(cid:190)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:185)(cid:277)(cid:183)(cid:286)(cid:215)"
    },
    {
      "id": "9618-2024-mj-33-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-mj-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q02",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:8)(cid:1)(cid:4)(cid:44)\n2 The TCP / IP protocol suite has four layers:\nSIHT\nNI Transport, Application, Link, Internet\nETIRW\n(a) Complete the diagram to show the correct order for these layers.\nTON\nOD\nNIGRAM\nSIHT\n[2]\nNI\nETIRW\n(b) Describe the function of the Transport layer.\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [2]\nSIHT\n(c) Outline one protocol that is associated with the Application layer.\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n............................................................................................................................................. [2]\nNIGRAM"
    },
    {
      "id": "9618-2024-mj-33-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        3,
        4
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-33-q03-p01.png",
        "9618-topic-20-further-programming/assets/9618-2024-mj-33-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n3 (a) Explain what is meant by non-composite and composite data types.\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON ...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:185)(cid:279)(cid:183)(cid:286)(cid:215) [Turn over\nNIGRAM\n4\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:8)(cid:1)(cid:5)(cid:44)\n(b) Write pseudocode statements to declare the record data type FootballClub to hold data\nSIHT\nabout football clubs in a league, to include:\nNI\nETIRW • name of team\n• date team joined the league\nTON • main telephone number\n• name of the manager\nOD\n• number of members\n• current position in the league.\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW .............."
    },
    {
      "id": "9618-2024-mj-33-q04",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q04",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 5
      },
      "text_excerpt": "TON\n4 (a) Describe the sequential method of file access.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [2]\nNI\nETIRW\n(b) Explain how the sequential method of file access is applied to files with serial organisation\nand to files with sequential organisation.\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n............................................................................................................................................. [3]\nTON\n(cid:300)(cid:213)(cid:250)(cid:190)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:187)(cid:277)(cid:183)(cid:288)(cid:215)"
    },
    {
      "id": "9618-2024-mj-33-q05",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:8)(cid:1)(cid:6)(cid:44)\n5 (a) Write this Reverse Polish Notation (RPN) in infix form:\nSIHT\nNI 5 2 + 9 3 - / 3 *\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................. [3]\nNIGRAM\n(b) Write this infix expression in RPN:\nSIHT\n((7 + 3) - (2 * 8)) / 6\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................. [2]\nNIGRAM\n(c) Evaluate this RPN expression:\nSIHT\na b - c d + * e /\nNI\nETIRW when\na = 17, b = 5, c = 7, d = 3 and e = 10 TON\nOD\nShow the changing contents of the stack as the RPN expression is evaluated.\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n[4]\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:187)(cid:279)(cid:183)(cid:288)(cid:215) [Turn over"
    },
    {
      "id": "9618-2024-mj-33-q06",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-33-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-mj-33-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 10
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:8)(cid:1)(cid:7)(cid:44)\n6 The diagram shows a logic circuit.\nSIHT\nQ NI A\nETIRW\nTON\nOD\nP R\nB Z\nNIGRAM\nSIHT\nS\nNI\nETIRW\nC\nTON\n(a) Complete the truth table for the given logic circuit. OD\nShow your working.\nNIGRAM\nWorking space\nA B C P Q R S Z\nSIHT\n0 0 0\nNI\nETIRW\n0 0 1\nTON 0 1 0\nOD\n0 1 1\n1 0 0\n1 0 1 NIGRAM\n1 1 0\nSIHT\n1 1 1\nNI\n[3]\nETIRW\n(b) Write the Boolean expression that corresponds to the logic circuit as a sum-of-products.\nTON\nOD Z = ............................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n............................................................................................................................................. [2]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:186)(cid:279)(cid:182)(cid:286)(cid:215)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:9)(cid:1)(cid:8)(cid:44)\n(c) (i) Complete the Karnaugh map (K-map) for the Boolean expression:\nSIHT\nNI .B.C + A.B.C + A.B.C + A.B.C + A.B.C + A.B.C A\nETIRW\nBC\n00 01 11 10 TON\nA\nOD\n0\n1\nNIGRAM\n[2]\nSIHT\n(ii) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal\nNI\nsum-of-products. [2]\nETIRW\n(iii) Write the Boolean expression from your answer to part (c)(ii) as a simplified\nTON\nsum-of-products.\nOD\n...........................................................................................................................................\n..................................................................................................................................... [1]\nNIGRAM"
    },
    {
      "id": "9618-2024-mj-33-q07",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2024-mj-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q07",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n7 (a) Describe what is meant by a digital certificate.\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(b) Explain the role of a digital certificate in creating a digital signature.\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................. [2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:249)(cid:191)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:185)(cid:279)(cid:182)(cid:286)(cid:215) [Turn over"
    },
    {
      "id": "9618-2024-mj-33-q08",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-mj-33-q08-p01.png",
        "9618-topic-20-further-programming/assets/9618-2024-mj-33-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q08",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:9)(cid:1)(cid:9)(cid:44)\n8 A declarative programming language is used to represent the features that are available and the\nSIHT\nfeatures that are unavailable on different body styles of a car.\nNI\nETIRW\n01 feature(sunroof).\n02 feature(automatic_tailgate).\nTON 03 feature(heated_seats).\n04 feature(extra_seats).\nOD\n05 feature(reversing_camera).\n06 feature(dashboard_camera).\n07 feature(air_conditioning).\n08 feature(heated_windscreen).\nNIGRAM\n09 feature(satnav).\n10 bodystyle(saloon).\nSIHT 11 bodystyle(hatchback).\n12 bodystyle(estate).\nNI\n13 bodystyle(minivan).\nETIRW\n14 bodystyle(convertible).\n15 available(sunroof, hatchback).\nTON\n16 available(sunroof, minivan).\nOD 17 available(reversing_camera, hatchback).\n18 available(extra_seats, minivan).\n19 available(reversing_camera, saloon).\n20 unavailable(sunroof, convertible).\nNIGRAM 21 unavailable(automatic_tailgate, saloon).\n22 unavailable(extra_seats, hatchback).\nSIHT\nThese clauses have the meanings:\nNI\nETIRW\nClause Meaning\n01 Sunroof is a feature. TON\n10 Saloon is a body style. OD\n15 Sunroof is available on a hatchback.\n20 Sunroof is unavailable on a convertible.\nNIGRAM\n(a) Sliding doors is a feature that is available on a minivan but unavailable on a hatchback. SIHT\nNI W rite additional clauses to represent this information.\nETIRW\n23 .............................................................................................................................................\nTON\n24 ............................................................................................................................................. OD\n25 .............................................................................................................................................\n[3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:249)(cid:191)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:187)(cid:277)(cid:182)(cid:288)(cid:215)\nNIGRAM\n9\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:9)(cid:1)(cid:10)(cid:44)\n(b) Using the variable Options, the goal:\nSIHT\nNI available(Options, saloon)\nETIRW\nreturns\nTON\nOptions = reversing_camera\nOD\nW rite the result returned by the goal:\navailable(Options, hatchback)\nNIGRAM\nOptions = ........................................................................................................................ [1]\nSIHT\n(c) F may be available for B if F is a feature and B is a body style and F is not unavailable for that\nNI\nbody style.\nETIRW\nW rite this as a rule:\nTON\nOD may_choose_option(F, B)\nIF .............................................................................................................................................\nNIGRAM ...................................................................................................................................................\n.........................................."
    },
    {
      "id": "9618-2024-mj-33-q09",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2024-mj-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 3
      },
      "text_excerpt": "ETIRW\n9 Explain what is meant by Deep Learning in relation to Artificial Intelligence (AI). TON\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\n..........................................................................................................................................................\nSIHT\nNI ..........................................................................................................................................................\nETIRW\n.................................................................................................................................................... [3]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:249)(cid:191)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:187)(cid:279)(cid:182)(cid:288)(cid:215) [Turn over"
    },
    {
      "id": "9618-2024-mj-33-q10",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-mj-33-q10-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-mj-33-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:9)(cid:2)(cid:1)(cid:44)\n10 (a) State a condition that must be true for an array to be searchable for a binary search.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n............................................................................................................................................. [1]\nTON\n(b) Complete the given pseudocode to find an item in a 1D array Names of type STRING using a\nOD\nbinary search.\nDECLARE Names : ARRAY[1:100000] OF STRING\nDECLARE TopOfList : INTEGER\nNIGRAM\nDECLARE EndOfList : INTEGER\nDECLARE CurrentItem : INTEGER\nSIHT DECLARE ToFind : STRING\nDECLARE Found : BOOLEAN\nNI\nDECLARE Not←InList : BOOLEAN\nETIRW\nTopOfList 1 ←\nEndOfList 100000\nTON\nOD OUTPUT \"Which name do you wish to find? \"\nINPUT ToFind\n...................................................................................................................................................\nNIGRAM ←\nFALSE NotInList\nSIHT\nWHILE ....................←............................ AND ................................................\nCurrentItem (TopOfList + EndOfList) DIV 2 NI\nETIRW\nIF .............←.............................................................................................. THEN\nFound TRUE TON\nELSE\nOD\nIF TopOfList >= EndOfList THEN\n...........................................................................................................\nELSE\nNIGRAM\nIF ToFind > Names[CurrentItem] THEN\n........................................................................................................... SIHT\nELSE ←\nNI EndOfList CurrentItem – 1\nETIRW\nENDIF\nENDIF\nTON\nENDIF\nENDWHILE OD\nIF Found = TRUE THEN\nOUTPUT \"Item found at position \", CurrentItem, \" in array\"\nELSE\nOUTPUT \"Item not in array\" NIGRAM\nENDIF\n[5]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:249)(cid:191)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:186)(cid:277)(cid:184)(cid:286)(cid:215)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:2)(cid:10)(cid:7)(cid:6)(cid:6)(cid:6)(cid:4)(cid:10)(cid:9)(cid:2)(cid:2)(cid:44)\n(c) Describe the performance of a binary search in relation to the number of data items in the\nSIHT\narray being searched. Refer to Big O notation in your answer.\nNI\nETIRW\n...................................................................................................................................................\nTON ...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................."
    },
    {
      "id": "9618-2024-mj-33-q11",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_33.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-mj-33-q11-p01.png",
        "9618-topic-16-system-software/assets/9618-2024-mj-33-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-33-q11",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_33.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n11 Reduced Instruction Set Computers (RISC) and Complex Instruction Set Computers (CISC) are\ntwo types of processor. SIHT\nNI\n(a) State two features of RISC processors.\nETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ............................................................................................................................................. [2]\n(b) Outline the process of interrupt handling as it could be applied to RISC or CISC processors.\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(c) Explain how pipelining affects interrupt handling for RISC processors.\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT ............................................................................................................................................. [3]\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:249)(cid:191)(cid:288)(cid:179)(cid:237)(cid:203)(cid:243)(cid:231)(cid:249)(cid:189)(cid:278)(cid:186)(cid:279)(cid:184)(cid:286)(cid:215)\nNIGRAM\n12\n(cid:44)(cid:1)(cid:1)(c"
    },
    {
      "id": "9618-2024-mj-41-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 27,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13
        ],
        "marks": 27
      },
      "text_excerpt": "A program needs to take integer numbers as input, sort the numbers and then search for a specific 1\nnumber.\nThe integer numbers will be stored in the global 1D array, , with space for up to (a)\nDataStored\n20 integers.\nThe global variable stores the quantity of items the array contains.\nNumberItems\nWrite program code to declare and .\nDataStored NumberItems\nSave your program as Question1_J24.\nCopy and paste the program code into part in the evidence document. 1(a)\n[1]\nThe procedure : (b)\nInitialise()\n• prompts the user to input the quantity of numbers the user would like to enter\n• reads the input and validates it is between 1 and 20 (inclusive)\n• prompts the user to input each number and stores each number in .\nDataStored\nWrite program code for .\nInitialise()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[5]\n© UCLES 2024 9618/41/M/J/24\n3\nThe main program stores in , calls and then outputs the (c)\n0 NumberItems Initialise()\ncontents of .\nDataStored\nWrite program code for the main program. (i)\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)(i)\n[2]\nTest your program by inputting the following data in the order given: (ii)\n30\n5\n3\n9\n4\n1\n2\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(c)(ii)\n[2]\nThe procedure uses a bubble sort to sort the data in into (d)\nBubbleSort() DataStored\nascending numerical order.\nWrite program code for . (i)\nBubbleSort()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(i)\n[4]\nWrite program code to amend the main program to call and then output (ii)\nBubbleSort()\nthe contents of .\nDataStored\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(ii)\n[1]\n[Turn over © UCLES 2024 9618/41/M/J/24\n4\nTest your program by inputting the following data in the order given: (iii)\n5\n3\n9\n4\n1\n2\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(d)(iii)\n[1]\nThe function : (e)\nBinarySearch()\n• takes the integer parameter to search for in the array\nDataToFind\n• performs an iterative binary search on the array\nDataStored\n• returns the index where is found in . If is not\nDataToFind DataStored DataToFind\nfound, the function returns .\n−1\nWrite program code for the iterative function . (i)\nBinarySearch()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(i)\n[6]\nWrite program code to amend the main program to: (ii)\n• take a number as input from the user\n• call with the number input\nBinarySearch()\n• output the value returned from the function call as its parameter.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(ii)\n[3]\n© UCLES 2024 9618/41/M/J/24\n5\nTest your program twice with the following inputs: (iii)\n1: 5 1 6 2 8 10 2 Test\n2: 5 1 6 2 8 10 7 Test\nTake a"
    },
    {
      "id": "9618-2024-mj-41-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_41.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9,
        10
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q02-p04.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q02-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_41.pdf?download=true",
        "source_pages": [
          14,
          15,
          16,
          17,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28
        ],
        "marks": 31
      },
      "text_excerpt": "A computer program will store data about trees. 2\nThe user can enter their requirements for a tree and a suitable tree will be selected.\nThe program is written using object‑oriented programming.\nThe class stores data about the trees.\nTree\nTree\nstores the name of the tree\nTreeName : STRING\nstores the number of cm the tree will grow each year\nHeightGrowth : INTEGER\nstores the maximum height in cm that the tree will grow\nMaxHeight : INTEGER\nstores the maximum width in cm that the tree will grow\nMaxWidth : INTEGER\nstores whether the tree keeps its leaves as , or\nEvergreen : STRING \"Yes\"\nloses its leaves as\n\"No\"\ninitialises , , ,\nConstructor() TreeName HeightGrowth MaxHeight\nand to its parameter values\nMaxWidth Evergreen\nreturns the name of the tree\nGetTreeName()\nreturns the number of cm the tree will grow each year\nGetGrowth()\nreturns the maximum height in cm that the tree will grow\nGetMaxHeight()\nreturns the maximum width in cm that the tree will grow\nGetMaxWidth()\nreturns whether the tree keeps its leaves or loses its\nGetEvergreen()\nleaves\nWrite program code to declare the class and its constructor. (a) (i)\nTree\nDo declare the other methods. not\nUse the appropriate constructor for your programming language.\nAll attributes must be private.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question2_J24.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\n© UCLES 2024 9618/41/M/J/24\n7\nThe get methods , , , (ii)\nGetTreeName() GetGrowth() GetMaxHeight()\nand each return the relevant attribute.\nGetMaxWidth() GetEvergreen()\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\nThe text file stores data about 9 trees. (b)\nTrees.txt\nThe data in the file is stored in the format:\nTree name,Height growth each year,Maximum height,Maximum width,Evergreen\nFor example, the first row of data is:\nBeech,30,400,200,No\nThe tree is a Beech. It can grow 30 cm each year. It has a maximum height of 400 cm.\nIt has a maximum width of 200 cm. It is evergreen (it loses its leaves). not\nThe function :\nReadData()\n• creates an array of type\nTree\n• reads the data from the file\n• raises an exception if the file is found not\n• creates a new object of type for each tree in the file\nTree\n• appends each object to the array\n• returns the array.\nWrite program code for .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[7]\n[Turn over © UCLES 2024 9618/41/M/J/24\n8\nThe procedure takes a object as a parameter and outputs the tree’s (c)\nPrintTrees() Tree\nname, height growth each year, maximum height, maximum width and whether it is evergreen.\nThe output message changes depending on whether it is evergreen.\nIf it is evergreen, it is in the format:\nhas a maximum height a maximum width and grows\nTreeName MaxHeight MaxWidth\ncm a year. It does not lose its leaves.\nHeightGrowth\nIf it is"
    },
    {
      "id": "9618-2024-mj-41-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_41.pdf?download=true",
      "source_pages": [
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p05.png",
        "9618-practical-programming/assets/9618-2024-mj-41-q03-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_41.pdf?download=true",
        "source_pages": [
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38
        ],
        "marks": 17
      },
      "text_excerpt": "A program reads data from the user and stores the data that is valid in a linear queue. 3\nThe queue is stored as a global 1D array, , of string values. The array needs space for\nQueueData\n20 elements.\nThe global variable stores the index of the first element in the queue.\nQueueHead\nThe global variable stores the index of the last element in the queue.\nQueueTail\nThe main program initialises all the elements in to a suitable null value, (a)\nQueueData\nto −1 and to −1.\nQueueHead QueueTail\nWrite program code for the main program.\nSave your program as Question3_J24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[1]\nThe function takes the data to insert into the queue as a parameter. (b)\nEnqueue()\nIf the queue is full, it inserts the parameter in the queue, updates the appropriate pointer(s) not\nand returns . If the queue is full, it returns .\nTRUE FALSE\nWrite program code for .\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[4]\nThe function returns if the queue is empty. If the queue is empty, it (c) not\nDequeue() \"false\"\nreturns the next item in the queue and updates the appropriate pointer(s).\nWrite program code for .\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)\n[3]\n[Turn over © UCLES 2024 9618/41/M/J/24\n12\nThe string values to be stored in the queue are 7 characters long. The first 6 characters are (d)\ndigits and the 7th character is a check digit. The check digit is calculated from the first 6 digits\nusing this algorithm:\n• multiply the digits in position 0, position 2 and position 4 by 1\n• multiply the digits in position 1, position 3 and position 5 by 3\n• calculate the sum of the products (add together the results from all of the multiplications)\n• divide the sum of the products by 10 and round the result down to the nearest integer to\nget the check digit\n• if the check digit equals 10 then it is replaced with ' '.\nX\nExample:\nData is 954123\nCharacter position 0 1 2 3 4 5\n9 5 4 1 2 3 Digit\n1 3 1 3 1 3 Multiplier\n9 15 4 3 2 9 Product\nSum of products = 9 + 15 + 4 + 3 + 2 + 9 = 42\nDivide sum of products by 10: 42 / 10 = 4 (rounded down)\nThe check digit = 4. This is inserted into character position 6.\nThe data including the check digit is: 9541234\nA 7‑character string is valid if the 7th character matches the check digit for that data. For\nexample, the data 9541235 is invalid because the 7th character (5) does match the check not\ndigit for 954123.\nThe subroutine takes ten 7‑character strings as input from the user and (i)\nStoreItems()\nuses the check digit to validate each input.\nEach valid input has the check digit removed and is stored in the queue using\n.\nEnqueue()\nAn appropriate message is output if the item is inserted. An appropriate message is\noutput if the queue is already full.\nInvalid inputs are stored in the queue. not\nThe subroutine counts and outputs the number of invalid items that were entered.\ncan be"
    },
    {
      "id": "9618-2024-mj-42-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 22,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20
        ],
        "marks": 22
      },
      "text_excerpt": "A program outputs a main word. The program asks the user to enter the different words of 3 or 1\nmore letters that can be made from the letters in the main word. These are called the answers.\nThere are 3 files: , and . Each file has the main word on the\nEasy.txt Medium.txt Hard.txt\nfirst line. For example, the main word in is house.\nEasy.txt\nThe answers are stored in the file. Each answer is on a new line after the main word. For example,\nhas 14 answers that can be made from the letters in house.\nEasy.txt\nThe words read from the text file are stored in the global array . The number of words\nWordArray\nthat can be made from the letters in the main word is stored in the global variable .\nNumberWords\nThe procedure : (a)\nReadWords()\n• takes a file name as a parameter\n• opens the file and reads in the data\n• stores the main word in the first element in\nWordArray\n• stores each answer in a new element in\nWordArray\n• counts and stores the number of answers.\nWrite program code for the procedure .\nReadWords()\nSave your program as Question1_J24.\nCopy and paste the program code into part in the evidence document. 1(a)\n[6]\nThe main program asks the user to enter , or and calls (b)\n\"easy\" \"medium\" \"hard\"\nwith the filename that matches the user’s input. For example, if the user enters\nReadWords()\n, the parameter is .\n\"easy\" \"Easy.txt\"\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[4]\n© UCLES 2024 9618/42/M/J/24\n3\nThe procedure : (c) (i)\nPlay()\n• outputs the main word from the array and the number of answers\n• allows the user to enter words until they enter the word ‘no’ to indicate they want to\nstop\n• outputs whether each word the user enters is an answer or an answer not\n• counts the number of answers the user gets correct\n• replaces each answer that the user gets correct with a null value in the array.\nWrite program code for the procedure .\nPlay()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)(i)\n[6]\nAmend the procedure so that when the user enters the command to stop, the (ii)\nPlay()\nprocedure:\n• outputs the percentage of answers the user entered from the array\n• outputs all the answers that the user did enter. not\nWrite program code to amend .\nPlay()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)(ii)\n[3]\nThe procedure calls after the data in the file has been read. (d) (i)\nReadWords() Play()\nWrite program code to amend .\nReadWords()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(i)\n[1]\n[Turn over © UCLES 2024 9618/42/M/J/24\n4\nTest your program by inputting these words in the order shown: (ii)\neasy\nshe\nout\nno\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(d)(ii)\n[1]\nTest your program by inputting these words in the order shown: (iii)\nhard\nfine\nfined\nidea\nno\nTake a scr"
    },
    {
      "id": "9618-2024-mj-42-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_42.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_42.pdf?download=true",
        "source_pages": [
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36
        ],
        "marks": 30
      },
      "text_excerpt": "A binary tree stores data in ascending order. For example: 2\n15\n8 19\n3 10\nA computer program stores integers in a binary tree in ascending order. The program uses\nObject‑Oriented Programming (OOP).\nThe binary tree is stored as a 1D array of nodes. Each node contains a left pointer, a data value\nand a right pointer.\nThe class stores the data about a node.\nNode\nNode\nstores the index of the node to the left in the binary tree\nLeftPointer : INTEGER\nstores the node’s data\nData : INTEGER\nstores the index of the node to the right in the binary tree\nRightPointer : INTEGER\ninitialises to its parameter value Constructor() Data\ninitialises and to −1\nLeftPointer RightPointer\nreturns the left pointer GetLeft()\nreturns the right pointer GetRight()\nreturns the data value GetData()\nassigns the parameter to the left pointer SetLeft()\nassigns the parameter to the right pointer SetRight()\nassigns the parameter to the data SetData()\nWrite program code to declare the class and its constructor. (a) (i)\nNode\nDo declare the other methods. not\nUse the appropriate constructor for your programming language.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question2_J24.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\n© UCLES 2024 9618/42/M/J/24\n7\nThe get methods , and each return the relevant (ii)\nGetLeft() GetRight() GetData()\nattribute.\nWrite program code for the get methods. three\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\nThe set methods , and each take a parameter and (iii)\nSetLeft() SetRight() SetData()\nthen store this in the relevant attribute.\nWrite program code for the set methods. three\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(iii)\n[3]\nThe class stores the data about the binary tree. (b)\nTreeClass\nTreeClass\nan array of 20 elements of type\nTree[0:19] : Node Node\nstores the index of the first node in the tree\nFirstNode : INTEGER\nstores the quantity of nodes in the tree\nNumberNodes : INTEGER\ninitialises to −1 and to 0 Constructor() FirstNode NumberNodes\ninitialises each element in to a object with the\nTree Node\ndata value of −1\ntakes a object as a parameter, inserts it in the array InsertNode() Node\nand updates the pointer for its parent node\noutputs the left pointer, data and right pointer of each OutputTree()\nnode in\nTree\nNodes cannot be deleted from this tree.\nWrite program code to declare the class and its constructor. (i)\nTreeClass\nDo declare the other methods. not\nUse the appropriate constructor for your programming language.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(i)\n[4]\n[Turn over © UCLES 2024 9618/42/M/J/24\n8\nThe method takes a object, , as a parameter and inserts (ii)\nInsertNode() Node NewNode\nit into the array .\nTree\nfirst checks if the tree i"
    },
    {
      "id": "9618-2024-mj-42-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 23,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_42.pdf?download=true",
      "source_pages": [
        10,
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p05.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p06.png",
        "9618-practical-programming/assets/9618-2024-mj-42-q03-p07.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_42.pdf?download=true",
        "source_pages": [
          37,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45,
          46,
          47,
          48,
          49,
          50
        ],
        "marks": 23
      },
      "text_excerpt": "A program sorts an array of integers and searches the array for a particular value. 3\nThe array of integers, , stores the following data in the order given: (a)\nNumberArray\n100 85 644 22 15 8 1\nThe array is declared and initialised local to the main program.\nWrite program code to declare and initialise the array.\nSave your program as Question3_J24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[1]\n© UCLES 2024 9618/42/M/J/24\n11\nThe following recursive pseudocode function sorts the array into ascending order using (b) (i)\nan insertion sort and returns the sorted array.\nDECLARE LastItem : INTEGER\nDECLARE CheckItem : INTEGER\nDECLARE LoopAgain : BOOLEAN\nFUNCTION RecursiveInsertion(IntegerArray : ARRAY[] OF INTEGER,\nNumberElements : INTEGER) RETURNS ARRAY[] OF INTEGER\nIF NumberElements <= 1 THEN\nRETURN IntegerArray\nELSE\nCALL RecursiveInsertion(IntegerArray, NumberElements - 1)\nLastItem IntegerArray[NumberElements - 1]\nCheckItem NumberElements - 2\nENDIF\nLoopAgain TRUE\nIF CheckItem < 0 THEN\nLoopAgain FALSE\nELSE\nIF IntegerArray[CheckItem] < LastItem THEN\nLoopAgain FALSE\nENDIF\nENDIF\nWHILE LoopAgain\nIntegerArray[CheckItem + 1] IntegerArray[CheckItem]\nCheckItem CheckItem - 1\nIF CheckItem < 0 THEN\nLoopAgain FALSE\nELSE\nIF IntegerArray[CheckItem] < LastItem THEN\nLoopAgain FALSE\nENDIF\nENDIF\nENDWHILE\nIntegerArray[CheckItem + 1] LastItem\nRETURN IntegerArray\nENDFUNCTION\nWrite the program code for the pseudocode function .\nRecursiveInsertion()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(i)\n[4]\n[Turn over © UCLES 2024 9618/42/M/J/24\n12\nAmend the main program to: (ii)\n• call with the initialised array and the\nRecursiveInsertion() NumberArray\nnumber of elements as parameters\n• output the word ‘Recursive’\n• output the content of the returned array.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 3(b)(iii)\n[1]\nThe function can be changed to use iteration instead of recursion. (c)\nRecursiveInsertion()\nWrite program code for the function to perform the same (i)\nIterativeInsertion()\nprocesses as but using iteration instead of recursion.\nRecursiveInsertion()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(i)\n[4]\nWrite program code to amend the main program to also: (ii)\n• call with the original initialised array\nIterativeInsertion() NumberArray\n• output the word ‘iterative’\n• output the content of the returned array.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(ii)\n[1]\nTest your program. (iii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 3(c)(iii)\n[1]\n© UCLES 2024 9618/42/M/J/24\n13\nThe recursive function takes the parameters: (d)\nBinarySearch"
    },
    {
      "id": "9618-2024-mj-43-q01",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 27,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13
        ],
        "marks": 27
      },
      "text_excerpt": "A program needs to take integer numbers as input, sort the numbers and then search for a specific 1\nnumber.\nThe integer numbers will be stored in the global 1D array, , with space for up to (a)\nDataStored\n20 integers.\nThe global variable stores the quantity of items the array contains.\nNumberItems\nWrite program code to declare and .\nDataStored NumberItems\nSave your program as Question1_J24.\nCopy and paste the program code into part in the evidence document. 1(a)\n[1]\nThe procedure : (b)\nInitialise()\n• prompts the user to input the quantity of numbers the user would like to enter\n• reads the input and validates it is between 1 and 20 (inclusive)\n• prompts the user to input each number and stores each number in .\nDataStored\nWrite program code for .\nInitialise()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[5]\n© UCLES 2024 9618/43/M/J/24\n3\nThe main program stores in , calls and then outputs the (c)\n0 NumberItems Initialise()\ncontents of .\nDataStored\nWrite program code for the main program. (i)\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)(i)\n[2]\nTest your program by inputting the following data in the order given: (ii)\n30\n5\n3\n9\n4\n1\n2\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(c)(ii)\n[2]\nThe procedure uses a bubble sort to sort the data in into (d)\nBubbleSort() DataStored\nascending numerical order.\nWrite program code for . (i)\nBubbleSort()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(i)\n[4]\nWrite program code to amend the main program to call and then output (ii)\nBubbleSort()\nthe contents of .\nDataStored\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(ii)\n[1]\n[Turn over © UCLES 2024 9618/43/M/J/24\n4\nTest your program by inputting the following data in the order given: (iii)\n5\n3\n9\n4\n1\n2\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(d)(iii)\n[1]\nThe function : (e)\nBinarySearch()\n• takes the integer parameter to search for in the array\nDataToFind\n• performs an iterative binary search on the array\nDataStored\n• returns the index where is found in . If is not\nDataToFind DataStored DataToFind\nfound, the function returns .\n−1\nWrite program code for the iterative function . (i)\nBinarySearch()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(i)\n[6]\nWrite program code to amend the main program to: (ii)\n• take a number as input from the user\n• call with the number input\nBinarySearch()\n• output the value returned from the function call as its parameter.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(ii)\n[3]\n© UCLES 2024 9618/43/M/J/24\n5\nTest your program twice with the following inputs: (iii)\n1: 5 1 6 2 8 10 2 Test\n2: 5 1 6 2 8 10 7 Test\nTake a"
    },
    {
      "id": "9618-2024-mj-43-q02",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_43.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9,
        10
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q02-p04.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q02-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_43.pdf?download=true",
        "source_pages": [
          14,
          15,
          16,
          17,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28
        ],
        "marks": 31
      },
      "text_excerpt": "A computer program will store data about trees. 2\nThe user can enter their requirements for a tree and a suitable tree will be selected.\nThe program is written using object‑oriented programming.\nThe class stores data about the trees.\nTree\nTree\nstores the name of the tree\nTreeName : STRING\nstores the number of cm the tree will grow each year\nHeightGrowth : INTEGER\nstores the maximum height in cm that the tree will grow\nMaxHeight : INTEGER\nstores the maximum width in cm that the tree will grow\nMaxWidth : INTEGER\nstores whether the tree keeps its leaves as , or\nEvergreen : STRING \"Yes\"\nloses its leaves as\n\"No\"\ninitialises , , ,\nConstructor() TreeName HeightGrowth MaxHeight\nand to its parameter values\nMaxWidth Evergreen\nreturns the name of the tree\nGetTreeName()\nreturns the number of cm the tree will grow each year\nGetGrowth()\nreturns the maximum height in cm that the tree will grow\nGetMaxHeight()\nreturns the maximum width in cm that the tree will grow\nGetMaxWidth()\nreturns whether the tree keeps its leaves or loses its\nGetEvergreen()\nleaves\nWrite program code to declare the class and its constructor. (a) (i)\nTree\nDo declare the other methods. not\nUse the appropriate constructor for your programming language.\nAll attributes must be private.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question2_J24.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\n© UCLES 2024 9618/43/M/J/24\n7\nThe get methods , , , (ii)\nGetTreeName() GetGrowth() GetMaxHeight()\nand each return the relevant attribute.\nGetMaxWidth() GetEvergreen()\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\nThe text file stores data about 9 trees. (b)\nTrees.txt\nThe data in the file is stored in the format:\nTree name,Height growth each year,Maximum height,Maximum width,Evergreen\nFor example, the first row of data is:\nBeech,30,400,200,No\nThe tree is a Beech. It can grow 30 cm each year. It has a maximum height of 400 cm.\nIt has a maximum width of 200 cm. It is evergreen (it loses its leaves). not\nThe function :\nReadData()\n• creates an array of type\nTree\n• reads the data from the file\n• raises an exception if the file is found not\n• creates a new object of type for each tree in the file\nTree\n• appends each object to the array\n• returns the array.\nWrite program code for .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[7]\n[Turn over © UCLES 2024 9618/43/M/J/24\n8\nThe procedure takes a object as a parameter and outputs the tree’s (c)\nPrintTrees() Tree\nname, height growth each year, maximum height, maximum width and whether it is evergreen.\nThe output message changes depending on whether it is evergreen.\nIf it is evergreen, it is in the format:\nhas a maximum height a maximum width and grows\nTreeName MaxHeight MaxWidth\ncm a year. It does not lose its leaves.\nHeightGrowth\nIf it is"
    },
    {
      "id": "9618-2024-mj-43-q03",
      "subject": "9618",
      "year": 2024,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_qp_43.pdf?download=true",
      "source_pages": [
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-may-june/qp/9618_s24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p05.png",
        "9618-practical-programming/assets/9618-2024-mj-43-q03-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-mj-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-may-june/ms/9618_s24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-May-June/9618_s24_ms_43.pdf?download=true",
        "source_pages": [
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38
        ],
        "marks": 17
      },
      "text_excerpt": "A program reads data from the user and stores the data that is valid in a linear queue. 3\nThe queue is stored as a global 1D array, , of string values. The array needs space for\nQueueData\n20 elements.\nThe global variable stores the index of the first element in the queue.\nQueueHead\nThe global variable stores the index of the last element in the queue.\nQueueTail\nThe main program initialises all the elements in to a suitable null value, (a)\nQueueData\nto −1 and to −1.\nQueueHead QueueTail\nWrite program code for the main program.\nSave your program as Question3_J24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[1]\nThe function takes the data to insert into the queue as a parameter. (b)\nEnqueue()\nIf the queue is full, it inserts the parameter in the queue, updates the appropriate pointer(s) not\nand returns . If the queue is full, it returns .\nTRUE FALSE\nWrite program code for .\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[4]\nThe function returns if the queue is empty. If the queue is empty, it (c) not\nDequeue() \"false\"\nreturns the next item in the queue and updates the appropriate pointer(s).\nWrite program code for .\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)\n[3]\n[Turn over © UCLES 2024 9618/43/M/J/24\n12\nThe string values to be stored in the queue are 7 characters long. The first 6 characters are (d)\ndigits and the 7th character is a check digit. The check digit is calculated from the first 6 digits\nusing this algorithm:\n• multiply the digits in position 0, position 2 and position 4 by 1\n• multiply the digits in position 1, position 3 and position 5 by 3\n• calculate the sum of the products (add together the results from all of the multiplications)\n• divide the sum of the products by 10 and round the result down to the nearest integer to\nget the check digit\n• if the check digit equals 10 then it is replaced with ' '.\nX\nExample:\nData is 954123\nCharacter position 0 1 2 3 4 5\n9 5 4 1 2 3 Digit\n1 3 1 3 1 3 Multiplier\n9 15 4 3 2 9 Product\nSum of products = 9 + 15 + 4 + 3 + 2 + 9 = 42\nDivide sum of products by 10: 42 / 10 = 4 (rounded down)\nThe check digit = 4. This is inserted into character position 6.\nThe data including the check digit is: 9541234\nA 7‑character string is valid if the 7th character matches the check digit for that data. For\nexample, the data 9541235 is invalid because the 7th character (5) does match the check not\ndigit for 954123.\nThe subroutine takes ten 7‑character strings as input from the user and (i)\nStoreItems()\nuses the check digit to validate each input.\nEach valid input has the check digit removed and is stored in the queue using\n.\nEnqueue()\nAn appropriate message is output if the item is inserted. An appropriate message is\noutput if the queue is already full.\nInvalid inputs are stored in the queue. not\nThe subroutine counts and outputs the number of invalid items that were entered.\ncan be"
    },
    {
      "id": "9618-2024-on-31-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-on-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 Numbers are stored in a computer using binary floating-point representation with:\nSIHT\n• NI 10 bits for the mantissa\nETIRW • 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the normalised binary floating-point representation of +201.125 in this system.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\nSIHT\nNI\nETIRW\nWorking .....................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT ...................................................................................................................................................\n[3]\nNI\nETIRW\n(b) Calculate the denary value of the given normalised binary floating-point number.\nTON\nShow your working.\nOD\nMantissa Exponent\n1 0 1 0 1 1 0 0 1 1 0 0 0 1 0 1\nNIGRAM\nSIHT\nWorking .....................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nAnswer ......................................................................................................................................\nSIHT\n[3]\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:252)(cid:184)(cid:254)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:173)(cid:251)(cid:205)(cid:296)(cid:244)(cid:285)(cid:213)(cid:257)(cid:257)(cid:289)(cid:191)(cid:199)(cid:258)(cid:203)(cid:271)(cid:258) O"
    },
    {
      "id": "9618-2024-on-31-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q02",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Reduced Instruction Set Computers (RISC) is a type of processor.\nSIHT\nNI Identify four features of a RISC processor.\nETIRW\n1 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n2 .......................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n3 .......................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n4 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD [4]"
    },
    {
      "id": "9618-2024-on-31-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 5
      },
      "text_excerpt": "3 (a) Describe circuit switching as a method of data transmission.\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\n(b) State one benefit and one drawback of circuit switching as a method of data transmission.\nNIGRAM\nBenefit ......................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\nDrawback ..................................................................................................................................\nTON\n...................................................................................................................................................\n[2] OD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:250)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:174)(cid:252)(cid:213)(cid:290)(cid:240)(cid:269)(cid:228)(cid:247)(cid:240)(cid:232)(cid:283)(cid:175)(cid:214)(cid:203)(cid:287)(cid:258) OD\n(cid:293)(cid:293)(cid:229)(cid:277)(cid:181)(cid:181)(cid:261)(cid:245)(cid:245)(cid:293)(cid:293)(cid:261)(cid:261)(cid:213)(cid:197)(cid:245)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2024-on-31-q04",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n4 The TCP/IP protocol may be viewed as a stack that contains four layers: Application, Transport,\nSIHT\nInternet, Link.\nNI\nETIRW\nDescribe how the layers of the TCP/IP protocol stack interact with each other.\nTON ..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\n.......................................................................................................................................................... SIHT\nNI\n..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\nOD .................................................................................................................................................... [4]"
    },
    {
      "id": "9618-2024-on-31-q05",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-on-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q05",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 5
      },
      "text_excerpt": "5 (a) Explain what is meant by a hashing algorithm in the context of file access.\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\n(b) The use of a hashing algorithm can result in the same storage location being identified for\nNIGRAM\nmore than one record.\nOutline two methods of overcoming this issue.\nSIHT\nNI 1 ................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n2 ................................................................................................................................................ OD\n...................................................................................................................................................\n[2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:252)(cid:184)(cid:256)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:174)(cid:249)(cid:213)(cid:300)(cid:254)(cid:284)(cid:215)(cid:249)(cid:247)(cid:223)(cid:185)(cid:275)(cid:248)(cid:219)(cid:279)(cid:258) OD\n(cid:293)(cid:213)(cid:245)(cid:277)(cid:245)(cid:181)(cid:261)(cid:213)(cid:277)(cid:197)(cid:277)(cid:261)(cid:197)(cid:213)(cid:293)(cid:245)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2024-on-31-q06",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-on-31-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q06",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n6 (a) Describe the user-defined data type set.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(b) Write pseudocode statements to declare the set data type, SymbolSet, to hold the following\nNI\nset of mathematical operators, using the variable Operators.\nETIRW\n+ – * / ^\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:250)(cid:184)(cid:256)(cid:215) [Turn over © UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:173)(cid:250)(cid:205)(cid:286)(cid:258)(cid:300)(cid:226)(cid:255)(cid:266)(cid:298)(cid:285)(cid:299)(cid:228)(cid:219)(cid:295)(cid:258) OD\n(cid:293)(cid:213)(cid:261)(cid:213)(cid:181)(cid:213)(cid:293)(cid:181)(cid:261)(cid:181)(cid:197)(cid:26"
    },
    {
      "id": "9618-2024-on-31-q07",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-31-q07-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-31-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9,
          10
        ],
        "marks": 10
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n7 The truth table for a logic circuit is shown.\nSIHT\nNI\nINPUT OUTPUT\nETIRW\nA B C D T\nTON\n0 0 0 0 0\nOD\n0 0 0 1 1\n0 0 1 0 0\nNIGRAM\n0 0 1 1 1\n0 1 0 0 0\nSIHT\n0 1 0 1 0 NI\nETIRW\n0 1 1 0 0\nTON\n0 1 1 1 0\nOD\n1 0 0 0 0\n1 0 0 1 1\nNIGRAM 1 0 1 0 0\n1 0 1 1 1\nSIHT\n1 1 0 0 0\nNI\nETIRW\n1 1 0 1 1\n1 1 1 0 0 TON\nOD\n1 1 1 1 1\n(a) Write the Boolean logic expression that correspo nds to the given truth table as the\nsum-of-products. NIGRAM\nT = ............................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:250)(cid:181)(cid:254)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:174)(cid:250)(cid:210)(cid:296)(cid:298)(cid:290)(cid:234)(cid:268)(cid:251)(cid:275)(cid:253)(cid:275)(cid:193)(cid:243)(cid:279)(cid:258) OD\n(cid:293)(cid:261)(cid:229)(cid:213)(cid:181)(cid:245)(cid:293)(cid:277)(cid:197)(cid:213)(cid:293)(cid:261)(cid:261)(cid:181)(cid:229)(cid:245)(cid:277)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) Complete the Karnaugh map (K-map) for the given truth table.\nSIHT\nAB NI\nETIRW\nCD\n00 01 11 10\nTON\nOD 00\n01\nNIGRAM\n11\nSIHT\n10 NI\nETIRW\n[2]\nTON\n(c) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.\nOD\n[2]\n(d) (i) Write the Boolean logic expression from your answer to part (c) as the simplified\nsum-of-products.\nNIGRAM\nT = ......................................................................................................................................\nSIHT\n..................................................................................................................................... [2]\nNI\nETIRW\n(ii) Use Boolean algebra to write your answer to part (d)(i) in its simplest form.\nTON\nT = ............................................................................................................................... [1]\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:252)(cid:181)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:173)(cid:249)(cid:218)(cid:290)(cid:294)(cid:274)(cid:207)(cid:238)(cid:262)(cid:214)(cid:217)(cid:299)(cid:277)(cid:243)(cid:295)(cid:258) OD\n(cid:293)(cid:261)(cid:213)(cid:277)(cid:245)(cid:277)(cid:261)(cid:245)(cid:213)(cid:229)(cid:181)(cid:261)(cid:261)(cid:213)(cid:197)(cid:181)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2024-on-31-q08",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n8 (a) Describe the process of segmentation for memory management.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n............................................................................................................................................. [4]\nTON\n(b) Explain what is meant by disk thrashing.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n............................................................................................................................................. [3] TON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:250)(cid:181)(cid:256)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:173)(cid:252)(cid:218)(cid:300)(cid:280)(cid:279)(cid:236)(cid:244)(cid:253)(cid:205)(cid:251)(cid:199)(cid:183)(cid:291)(cid:271)(cid:258) OD\n(cid:293)(cid:181)(cid:261)(cid:277)(cid:181)(cid:277)(cid:261)(cid:213)(cid:181)(cid:261)(cid:197)(cid:261)(cid:197)(cid:213)(cid:293)(cid:181)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2024-on-31-q09",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q09",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n9 A veterinary surgery wants to create a class for individual pets.\nSIHT\nSome of the attributes required in the class are listed in the table.\nNI\nETIRW\nAttribute Data type Description\nPetID STRING unique ID assigned at registration TON\nOD PetType STRING type of pet assigned at registration\ntelephone number of owner assigned at\nOwnerTelephone STRING\nregistration\nNIGRAM\nDateRegistered DATE date of registration\nSIHT\n(a) State one reason why the attributes would be declared as PRIVATE.\nNI\nETIRW\n...................................................................................................................................................\nTON ............................................................................................................................................. [1]\nOD\n(b) Complete the class diagram for Pet, to include:\n• an attribute and data type for the name of the pet\n• an attribute and data type for the name of the owner\nNIGRAM\n• a method to create a Pet object and set attributes at the time of registration\n• a method to assign a pet ID\n• a method to assign the date of registration SIHT\n• a method to return the pet name\nNI\n• a method to return the owner’s telephone number.\nETIRW\nPet TON\nOD PetID : STRING\nPetType : STRING\nOwnerTelephone : STRING\nNIGRAM\nDateRegistered : DATE\nSIHT .............................................................. : ..............................................................\nNI\nETIRW .............................................................. : ..............................................................\nTON\n................................................................................................................................. OD\n.................................................................................................................................\n................................................................................................................................. NIGRAM\n.................................................................................................................................\nSIHT\n.................................................................................................................................\nNI\nETIRW\n[5]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:252)(cid:181)(cid:256)(cid:215) [Turn over © UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:174)(cid:251)(cid:210)(cid:286)(cid:284)(cid:295)(cid:205)(cid:262)(cid:244)(cid:284)(cid:223)(cid:175)(cid:291)(cid:291)(cid:287)(cid:258) OD\n(cid:293)(cid:181)(cid:245)(cid:213)(cid:245)(cid:245)(cid:293)(cid:181)(cid:229)(cid:245)(cid:277)(cid:261)(cid:197)(cid:181)(cid:261)(cid:245)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2024-on-31-q10",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-31-q10-p01.png",
        "9618-topic-16-system-software/assets/9618-2024-on-31-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q10",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          13,
          14
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n10 Several syntax diagrams are shown.\nSIHT\nletter operator NI\nA + ETIRW\nTON\nE –\nOD\nI *\nNIGRAM\nO /\nSIHT\ndigit U NI\n0\nETIRW\nY TON\n1\nOD\nsymbol\n2 #\nNIGRAM\n3 $\nSIHT\n4 ? NI\nETIRW\n5 & TON\nOD\n6 @\nNIGRAM 7\nSIHT\n8\nNI\nETIRW\n9\nTON\nOD label\ndigit digit letter\nNIGRAM\nequation\nlabel operator label label =\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:250)(cid:183)(cid:254)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:176)(cid:252)(cid:211)(cid:298)(cid:272)(cid:257)(cid:230)(cid:251)(cid:262)(cid:247)(cid:279)(cid:197)(cid:211)(cid:219)(cid:295)(cid:258) OD\n(cid:293)(cid:293)(cid:293)(cid:213)(cid:181)(cid:277)(cid:229)(cid:213)(cid:277)(cid:181)(cid:197)(cid:197)(cid:197)(cid:245)(cid:293)(cid:181)(cid:229)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n(a) Complete the Backus-Naur Form (BNF) for the given syntax diagrams.\nSIHT\nNI <operator> ::= ..................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n<label> ::= .........................................................................................................................\nOD\n...................................................................................................................................................\n<equation> ::= ..................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT [4]\nNI\n(b) A new syntax rule, password, is required. It must begin with a letter or a symbol, followed by\nETIRW\na digit and end with one or two symbols.\nTON\n(i) Draw a syntax diagram for password.\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[3]\n(ii) Write the BNF for password.\nNIGRAM\n...........................................................................................................................................\n...........................................................................................................................................\nSIHT\nNI ...........................................................................................................................................\nETIRW\n..................................................................................................................................... [2]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(c"
    },
    {
      "id": "9618-2024-on-31-q11",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_31.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q11-p01.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q11-p02.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q11-p03.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q11-p04.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-31-q11-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-31-q11",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_31.pdf?download=true",
        "source_pages": [
          15,
          16,
          17
        ],
        "marks": 12
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n11 The following diagram shows an ordered binary tree.\nSIHT\nNI\nRed ETIRW\nTON\nOD\nGreen Yellow\nNIGRAM\nBlue Orange Violet\nSIHT\nNI\nIndigo\nETIRW\nTON\n(a) A linked list of nodes is used to store the data. Each node consists of a left pointer , the data\nOD and a right pointer.\n–1 is used to represent a null pointer .\nNIGRAM Complete this linked list to represent the given binary tree.\nRootPtr\nSIHT\nNI\nETIRW\nLeftPtr Data RightPtr\nTON\nRed\nOD\nGreen\nNIGRAM\n–1 Blue –1\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\n[4]\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:250)(cid:183)(cid:256)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:175)(cid:250)(cid:219)(cid:294)(cid:290)(cid:248)(cid:232)(cid:259)(cid:244)(cid:185)(cid:289)(cid:273)(cid:229)(cid:203)(cid:287)(cid:258) OD\n(cid:293)(cid:213)(cid:197)(cid:277)(cid:181)(cid:245)(cid:197)(cid:277)(cid:293)(cid:293)(cid:293)(cid:197)(cid:261)(cid:277)(cid:229)(cid:245)(cid:229)(cid:213)\nNIGRAM\n13\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:4)(cid:44)\n(b) A user-defined record structure is used to store the nodes of the linked list in part (a).\nSIHT\nComplete the diagram, using your answer for part (a). NI\nETIRW\nRootPtr Index LeftPtr Data RightPtr\nTON\n0 Red 0\nOD\nGreen 1\nYellow 2\nNIGRAM\nBlue 3\nOrange 4 SIHT\nNI Indigo 5\nETIRW\nViolet FreePtr 6\nTON\n7\nOD\n[4]\n(c) The linked list in part (a) is implemented using a 1D array of records. Each record contains a\nleft pointer, data and a right pointer.\nNIGRAM\nThe following pseudocode represents a function that searches for an element in the array of\nrecords BinTree. It returns the index of the record if the element is found, or it returns a null\nSIHT\npointer if the element is not found.\nNI\nETIRW Complete the pseudocode for the function.\nTON\nFUNCTION SearchTree(Item : STRING) ........................................................................\nOD\n......................................................................................................................... NowPtr\nWHILE NowPtr <> -1\nNIGRAM\nIF ..................................................................................................................... THEN\nSIHT NowPtr BinTree[NowPtr].LeftPtr\nNI ELSE\nETIRW\nIF BinTree[NowPtr].Data < Item THEN\nTON\n.........................................................................................................................\nOD\nELSE\nRETURN NowPtr\nENDIF NIGRAM\nENDIF\nSIHT ENDWHILE\nRETURN NowPtr NI\nETIRW\nENDFUNCTION\n[4]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:252)(cid:183)(cid:256)(cid:215)\n© UCLES 2024 9618/31/O/N/24 (cid:300)(cid:225)(cid:176)(cid:249)(cid:211)(cid:292)(cid:286)(cid:264)(cid:209)(cid:245)(cid:253)(cid:2"
    },
    {
      "id": "9618-2024-on-32-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q01",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 (a) Describe how packet switching is used to transmit messages across a network.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(b) State two benefits and two drawbacks of packet switching as a method of transmitting\nNI\nmessages across a network.\nETIRW\nBenefit 1 ...................................................................................................................................\nTON\nOD ...................................................................................................................................................\nBenefit 2 ...................................................................................................................................\nNIGRAM ...................................................................................................................................................\nDrawback 1 ...............................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\nDrawback 2 ...............................................................................................................................\nTON\n...................................................................................................................................................\nOD\n[4]"
    },
    {
      "id": "9618-2024-on-32-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-on-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q02",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 3
      },
      "text_excerpt": "2 (a) Describe serial file organisation as a method of storing data records in a file.\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n............................................................................................................................................. [2]\nOD\n(b) State one example of a use for serial file organisation.\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [1]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:183)(cid:254)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:214)(cid:241)(cid:206)(cid:287)(cid:252)(cid:237)(cid:229)(cid:267)(cid:241)(cid:274)(cid:251)(cid:178)(cid:253)(cid:180)(cid:285)(cid:258) OD\n(cid:293)(cid:245)(cid:213)(cid:277)(cid:245)(cid:213)(cid:261)(cid:245)(cid:245)(cid:293)(cid:293)(cid:197)(cid:261)(cid:213)(cid:261)(cid:245)(cid:181)(cid:213)"
    },
    {
      "id": "9618-2024-on-32-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-on-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q03",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n3 (a) Describe the user‑defined data type record.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(b) A programmer defines a record, Order, to store the following data:\nNI\nETIRW\n• account number\n• order number\nTON\n• order price\n• OD order date.\nW rite pseudocode statements to define this record.\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [4]\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:183)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:213)(cid:242)(cid:214)(cid:297)(cid:248)(cid:253)(cid:212)(cid:237)(cid:256)(cid:215)(cid:223)(cid:202)(cid:217)(cid:180)(cid:269)(cid:258) OD\n(cid:293)(cid:245)(cid:229)(cid:213)(cid:181)(cid:181)(cid:293)(cid:277)(cid:293)(cid:"
    },
    {
      "id": "9618-2024-on-32-q04",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-on-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q04",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n4 Numbers are stored in a computer using binary floating‑point representation with:\nSIHT\n• NI 12 bits for the mantissa\nETIRW • 4 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the denary value of the given normalised binary floating‑point number.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\n1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 0\nSIHT\nNI Working .....................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\nAnswer ......................................................................................................................................\n[2]\nNIGRAM\n(b) Calculate the normalised binary floating‑point representation of – 49.1875 in this system.\nSIHT Show your working.\nNI\nMantissa Exponent\nETIRW\nTON\nOD\nWorking .....................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:183)(cid:256)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:213)(cid:243)(cid:214)(cid:291)(cid:262)(cid:268)(cid:231)(cid:243)(cid:263)(cid:208)(cid:253)(cid:294)(cid:251)(cid:228)(cid:293)(cid:258) OD\n(cid:293)(cid:197)(cid:245)(cid:213)(cid:245)(cid:181)(cid:293)(cid:181)(cid:261)(cid:181)(cid:197)(cid:197)(cid:197)(cid:181)(cid:197)(cid:181)("
    },
    {
      "id": "9618-2024-on-32-q05",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q05",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n5 (a) Name and describe two protocols used by the Application Layer of the TCP/IP protocol suite.\nSIHT\nNI Protocol 1 .................................................................................................................................\nETIRW\nDescription ................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\nProtocol 2 .................................................................................................................................\nNIGRAM\nDescription ................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\n[4]\nTON\nOD (b) Explain the purpose and function of the Application Layer in the TCP/IP protocol suite.\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n............................................................................................................................................. [3]\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:183)(cid:256)(cid:215) [Turn over © UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:214)(cid:244)(cid:206)(cid:293)(cid:266)(cid:252)(cid:210)(cid:261)(cid:250)(cid:281)(cid:217)(cid:270)(cid:223)(cid:228)(cid:277)(cid:258) OD\n(cid:293)(cid:197)(cid:261)(cid:277)(cid:181)(cid:213)(cid:261)(cid:213)(cid:277)(cid:197)(cid:277)(cid:197)(cid:197)(cid:213)(cid:229)(cid:245)(cid:22"
    },
    {
      "id": "9618-2024-on-32-q06",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-32-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-32-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n6 The truth table for a logic circuit is shown.\nSIHT\nNI\nINPUT OUTPUT\nETIRW\nA B C D X\nTON\n0 0 0 0 0\nOD\n0 0 0 1 1\n0 0 1 0 1\nNIGRAM\n0 0 1 1 0\n0 1 0 0 0 SIHT\nNI 0 1 0 1 1\nETIRW\n0 1 1 0 1\nTON\n0 1 1 1 0\nOD\n1 0 0 0 0\n1 0 0 1 1\nNIGRAM\n1 0 1 0 1\n1 0 1 1 0\nSIHT\n1 1 0 0 0\nNI\nETIRW\n1 1 0 1 1\nTON 1 1 1 0 1\nOD\n1 1 1 1 0\n(a) Write the Boolean logic expression that correspo nds to the given truth table as the NIGRAM\nsum‑of‑products.\nSIHT X = ............................................................................................................................................\nNI\n............................................................................................................................................. [3] ETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:182)(cid:254)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:213)(cid:244)(cid:209)(cid:287)(cid:290)(cid:242)(cid:218)(cid:258)(cid:267)(cid:292)(cid:185)(cid:294)(cid:190)(cid:268)(cid:293)(cid:258) OD\n(cid:293)(cid:277)(cid:229)(cid:277)(cid:181)(cid:245)(cid:261)(cid:245)(cid:213)(cid:229)(cid:181)(cid:197)(cid:261)(cid:213)(cid:261)(cid:181)(cid:245)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) Complete the Karnaugh map (K‑map) for the given truth table.\nSIHT\nNI\nAB\nETIRW\nCD\n00 01 11 10\nTON\nOD\n00\n01\nNIGRAM\n11\nSIHT\nNI\n10\nETIRW\n[2]\nTON\n(c) Draw loop(s) around appropriate group(s) in the K‑map to produce an optimal sum‑of‑products.\nOD\n[2]\n(d) Write the Boolean logic expression from your answer to part (c) as the simplified\nsum‑of‑products.\nNIGRAM\nX = ............................................................................................................................................\nSIHT\n............................................................................................................................................. [2]\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:182)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:214)(cid:243)(cid:217)(cid:297)(cid:286)(cid:258)(cid:223)(cid:248)(cid:246)(cid:229)(cid:285)(cid:270)(cid:282)(cid:268)(cid:277)(cid:258) OD\n(cid:293)(cid:277)(cid:213)(cid:213)(cid:245)(cid:277)(cid:293)(cid:277)(cid:197)(cid:213)(cid:293)(cid:197)(cid:261)(cid:181)(cid:293)(cid:245)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2024-on-32-q07",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-32-q07-p01.png",
        "9618-topic-16-system-software/assets/9618-2024-on-32-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q07",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n7 Several syntax diagrams are shown.\nSIHT\nodd even NI\n1 0 ETIRW\nTON\n3 2\nOD\n5 4\nNIGRAM\n7 6\nSIHT\nNI\n9 8\nETIRW\nTON\nsymbol letter OD\n% A\n£ B\nNIGRAM\n# C SIHT\nNI\nETIRW\n@ D\nTON\nOD $ E\nNIGRAM\nSIHT\nNI\nnumber\nETIRW odd odd\nTON\neven\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:182)(cid:256)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:214)(cid:242)(cid:217)(cid:291)(cid:272)(cid:263)(cid:220)(cid:250)(cid:237)(cid:222)(cid:191)(cid:178)(cid:188)(cid:284)(cid:285)(cid:258) OD\n(cid:293)(cid:229)(cid:261)(cid:213)(cid:181)(cid:277)(cid:293)(cid:181)(cid:229)(cid:245)(cid:277)(cid:197)(cid:197)(cid:181)(cid:197)(cid:245)(cid:245)(cid:213)\nNIGRAM\n9\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n(a) State why each number is invalid for the given syntax diagrams.\nSIHT\nNI 21\nETIRW\nReason .....................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n123\nReason .....................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT [2]\nNI\n(b) Complete the Backus‑Naur Form (BNF) for the given syntax diagrams.\nETIRW\n<symbol> ::= ........................................................................................................................\nTON\nOD ...................................................................................................................................................\n<number> ::= ........................................................................................................................\nNIGRAM ...................................................................................................................................................\n[2]\nSIHT\n(c) A new syntax rule, code, is required. It must begin with a letter , followed by one or two\nnumbers, and end with a symbol. NI\nETIRW\n(i) Draw a syntax diagram for code.\nTON\nOD\nNIGRAM\n[3]\nSIHT\nNI (ii) Write the BNF for code.\nETIRW\n...........................................................................................................................................\nTON\n........................................................................................................................................... OD\n........................................................................................................................"
    },
    {
      "id": "9618-2024-on-32-q08",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q08",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n8 Complex Instruction Set Computer (CISC) is a type of processor.\nSIHT\nNI Identify four features of a CISC processor.\nETIRW\n1 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n2 .......................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n3 .......................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n4 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD [4]"
    },
    {
      "id": "9618-2024-on-32-q09",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 5
      },
      "text_excerpt": "9 (a) The kernel is the central component of an Operating System (OS).\nNIGRAM\nOutline how the kernel of an OS acts as an interrupt handler .\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n............................................................................................................................................. [2]\n(b) (i) State what is meant by the term multi‑tasking in an Operating System.\nNIGRAM\n...........................................................................................................................................\n..................................................................................................................................... [1]\nSIHT\nNI (ii) Describe how multi‑tasking is implemented in an Operating System.\nETIRW\n...........................................................................................................................................\nTON\n........................................................................................................................................... OD\n...........................................................................................................................................\n..................................................................................................................................... [2] NIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:184)(cid:254)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:215)(cid:242)(cid:212)(cid:289)(cid:280)(cid:273)(cid:214)(cid:241)(cid:246)(cid:264)(cid:227)(cid:180)(cid:208)(cid:228)(cid:277)(cid:258) OD\n(cid:293)(cid:245)(cid:293)(cid:277)(cid:181)(cid:277)(cid:197)(cid:181)(cid:261)(cid:197)(cid:277)(cid:261)(cid:197)(cid:277)(cid:197)(cid:245)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2024-on-32-q10",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-on-32-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q10",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          11,
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n10 Objects and classes form the basic structure of Object‑Oriented Programming (OOP).\nSIHT\nNI (a) Outline the structure of a class.\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\n(b) Give three differences between an object and a class.\nTON\n1 ................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n2 ................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n3 ................................................................................................................................................ TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:216)(cid:241)(cid:220)(cid:295)(cid:284)(cid:289)(cid:227)(cid:263)(cid:267)(cid:193)(cid:247)(cid:204)(cid:268)(cid:228)(cid:293"
    },
    {
      "id": "9618-2024-on-32-q11",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_32.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q11-p01.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q11-p02.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q11-p03.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q11-p04.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-32-q11-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-32-q11",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_32.pdf?download=true",
        "source_pages": [
          13,
          14,
          15
        ],
        "marks": 12
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n11 This binary tree shows an ordered list of integers.\nSIHT\nNI\n25 ETIRW\nTON\nOD 4 36\n1 16 64 NIGRAM\nSIHT\n9 49\nNI\nETIRW\n(a) A linked list of nodes is used to store the data. Each node consists of a left pointer , the data\nand a right pointer. TON\nOD\n−1 is used to represent a null pointer .\nComplete this linked list to represent the given binary tree organisation.\nNIGRAM\nRootPtr\nSIHT\nNI\nLeftPtr Data RightPtr\nETIRW\n25\nTON\nOD\n4\nNIGRAM\n–1 1 –1\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:184)(cid:256)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:216)(cid:244)(cid:220)(cid:285)(cid:298)(cid:296)(cid:216)(cid:265)(cid:260)(cid:202)(cid:213)(cid:296)(cid:234)(cid:180)(cid:269)(cid:258) OD\n(cid:293)(cid:197)(cid:197)(cid:213)(cid:181)(cid:245)(cid:229)(cid:245)(cid:245)(cid:277)(cid:181)(cid:261)(cid:261)(cid:245)(cid:261)(cid:181)(cid:197)(cid:213)\nNIGRAM\n13\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:4)(cid:44)\n(b) A 2D array is used to store the nodes of the linked list in part (a).\nSIHT\nNI Complete the diagram using your answer for part (a).\nETIRW\nRootPtr Index LeftPtr Data RightPtr\nTON\n0 25 0\nOD\n4 1\n36 2\nNIGRAM 1 3\n16 4\nSIHT\n64 5\nNI\n9 FreePtr 6\nETIRW\n49 7\nTON\n8\nOD\n[4]\n(c) The linked list in part (a) is implemented using a 1D array of records. Each record contains a\nleft pointer, data and a right pointer.\nNIGRAM\nThe following pseudocode represents a function that searches for an element in the array of\nrecords LinkList. It returns the index of the record if the element is found, or it returns a\nSIHT\nnull pointer if the element is not found.\nNI\nETIRW\nComplete the pseudocode for the function.\nTON\nFUNCTION SearchList(Item : INTEGER)........................................................................\nOD\n−1 NullPtr\nRootPtr ....................................................................\nNIGRAM WHILE NowPtr <> NullPtr\nIF LinkList[NowPtr].Data < Item THEN\nSIHT NowPtr LinkList[NowPtr].RightPtr\nELSE NI\nETIRW\nIF .............................................................................................................. THEN\nTON\nOD\nNowPtr .....................................................................................................\nELSE\nRETURN NowPtr\nNIGRAM\nENDIF\nENDIF\nSIHT\nENDWHILE\nNI\nRETURN NullPtr\nETIRW\nENDFUNCTION\n[4]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:184)(cid:256)(cid:215)\n© UCLES 2024 9618/32/O/N/24 (cid:300)(cid:235)(cid:215)(cid:243)(cid:212)(cid:299)(cid:294)(cid:280)(cid:225)(cid:239)(cid:237)(cid:255)(cid:257)(cid:272)(cid:238)(cid:180)(cid:285)(cid:258) OD\n(cid:293)(cid:197)(cid:181)(cid:277)(cid:245)(cid"
    },
    {
      "id": "9618-2024-on-33-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2024-on-33-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q01",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 Numbers are stored in a computer using binary floating-point representation with:\nSIHT\n• NI 10 bits for the mantissa\nETIRW • 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the normalised binary floating-point representation of +201.125 in this system.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\nSIHT\nNI\nETIRW\nWorking .....................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT ...................................................................................................................................................\n[3]\nNI\nETIRW\n(b) Calculate the denary value of the given normalised binary floating-point number.\nTON\nShow your working.\nOD\nMantissa Exponent\n1 0 1 0 1 1 0 0 1 1 0 0 0 1 0 1\nNIGRAM\nSIHT\nWorking .....................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nAnswer ......................................................................................................................................\nSIHT\n[3]\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:184)(cid:254)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:217)(cid:244)(cid:211)(cid:298)(cid:294)(cid:239)(cid:211)(cid:259)(cid:246)(cid:229)(cid:245)(cid:290)(cid:178)(cid:228)(cid:264)(cid:258) O"
    },
    {
      "id": "9618-2024-on-33-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q02",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Reduced Instruction Set Computers (RISC) is a type of processor.\nSIHT\nNI Identify four features of a RISC processor.\nETIRW\n1 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n2 .......................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n3 .......................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n4 .......................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD [4]"
    },
    {
      "id": "9618-2024-on-33-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          5,
          6
        ],
        "marks": 5
      },
      "text_excerpt": "3 (a) Describe circuit switching as a method of data transmission.\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\n(b) State one benefit and one drawback of circuit switching as a method of data transmission.\nNIGRAM\nBenefit ......................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\nDrawback ..................................................................................................................................\nTON\n...................................................................................................................................................\n[2] OD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:218)(cid:243)(cid:219)(cid:288)(cid:298)(cid:255)(cid:230)(cid:245)(cid:267)(cid:292)(cid:225)(cid:282)(cid:294)(cid:228)(cid:248)(cid:258) OD\n(cid:293)(cid:229)(cid:229)(cid:277)(cid:181)(cid:213)(cid:293)(cid:277)(cid:277)(cid:229)(cid:229)(cid:261)(cid:261)(cid:245)(cid:293)(cid:181)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2024-on-33-q04",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n4 The TCP/IP protocol may be viewed as a stack that contains four layers: Application, Transport,\nSIHT\nInternet, Link.\nNI\nETIRW\nDescribe how the layers of the TCP/IP protocol stack interact with each other.\nTON ..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\n.......................................................................................................................................................... SIHT\nNI\n..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\nOD .................................................................................................................................................... [4]"
    },
    {
      "id": "9618-2024-on-33-q05",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2024-on-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q05",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 5
      },
      "text_excerpt": "5 (a) Explain what is meant by a hashing algorithm in the context of file access.\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\n(b) The use of a hashing algorithm can result in the same storage location being identified for\nNIGRAM\nmore than one record.\nOutline two methods of overcoming this issue.\nSIHT\nNI 1 ................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n2 ................................................................................................................................................ OD\n...................................................................................................................................................\n[2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:184)(cid:256)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:218)(cid:242)(cid:219)(cid:294)(cid:284)(cid:266)(cid:209)(cid:251)(cid:260)(cid:299)(cid:259)(cid:182)(cid:200)(cid:180)(cid:256)(cid:258) OD\n(cid:293)(cid:277)(cid:245)(cid:277)(cid:245)(cid:213)(cid:293)(cid:181)(cid:245)(cid:261)(cid:213)(cid:261)(cid:197)(cid:245)(cid:197)(cid:181)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2024-on-33-q06",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2024-on-33-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q06",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n6 (a) Describe the user-defined data type set.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(b) Write pseudocode statements to declare the set data type, SymbolSet, to hold the following\nNI\nset of mathematical operators, using the variable Operators.\nETIRW\n+ – * / ^\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:184)(cid:256)(cid:215) [Turn over © UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:217)(cid:241)(cid:211)(cid:292)(cid:280)(cid:250)(cid:232)(cid:253)(cid:237)(cid:222)(cid:215)(cid:190)(cid:276)(cid:180)(cid:240)(cid:258) OD\n(cid:293)(cid:277)(cid:261)(cid:213)(cid:181)(cid:181)(cid:261)(cid:213)(cid:293)(cid:245)(cid:261)(cid:26"
    },
    {
      "id": "9618-2024-on-33-q07",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-33-q07-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-33-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          8,
          9,
          10
        ],
        "marks": 10
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n7 The truth table for a logic circuit is shown.\nSIHT\nNI\nINPUT OUTPUT\nETIRW\nA B C D T\nTON\n0 0 0 0 0\nOD\n0 0 0 1 1\n0 0 1 0 0\nNIGRAM\n0 0 1 1 1\n0 1 0 0 0\nSIHT\n0 1 0 1 0 NI\nETIRW\n0 1 1 0 0\nTON\n0 1 1 1 0\nOD\n1 0 0 0 0\n1 0 0 1 1\nNIGRAM 1 0 1 0 0\n1 0 1 1 1\nSIHT\n1 1 0 0 0\nNI\nETIRW\n1 1 0 1 1\n1 1 1 0 0 TON\nOD\n1 1 1 1 1\n(a) Write the Boolean logic expression that correspo nds to the given truth table as the\nsum-of-products. NIGRAM\nT = ............................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:181)(cid:254)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:218)(cid:241)(cid:208)(cid:298)(cid:240)(cid:244)(cid:224)(cid:266)(cid:256)(cid:215)(cid:183)(cid:182)(cid:241)(cid:284)(cid:256)(cid:258) OD\n(cid:293)(cid:197)(cid:229)(cid:213)(cid:181)(cid:277)(cid:261)(cid:245)(cid:229)(cid:277)(cid:229)(cid:261)(cid:261)(cid:277)(cid:261)(cid:181)(cid:197)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) Complete the Karnaugh map (K-map) for the given truth table.\nSIHT\nAB NI\nETIRW\nCD\n00 01 11 10\nTON\nOD 00\n01\nNIGRAM\n11\nSIHT\n10 NI\nETIRW\n[2]\nTON\n(c) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal sum-of-products.\nOD\n[2]\n(d) (i) Write the Boolean logic expression from your answer to part (c) as the simplified\nsum-of-products.\nNIGRAM\nT = ......................................................................................................................................\nSIHT\n..................................................................................................................................... [2]\nNI\nETIRW\n(ii) Use Boolean algebra to write your answer to part (d)(i) in its simplest form.\nTON\nT = ............................................................................................................................... [1]\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:181)(cid:254)(cid:215) [Turn over © UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:217)(cid:242)(cid:216)(cid:288)(cid:244)(cid:260)(cid:217)(cid:240)(cid:241)(cid:274)(cid:291)(cid:190)(cid:229)(cid:284)(cid:240)(cid:258) OD\n(cid:293)(cid:197)(cid:213)(cid:277)(cid:245)(cid:245)(cid:293)(cid:277)(cid:181)(cid:293)(cid:245)(cid:261)(cid:261)(cid:245)(cid:293)(cid:245)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2024-on-33-q08",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-33-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n8 (a) Describe the process of segmentation for memory management.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n............................................................................................................................................. [4]\nTON\n(b) Explain what is meant by disk thrashing.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n............................................................................................................................................. [3] TON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:181)(cid:256)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:217)(cid:243)(cid:216)(cid:294)(cid:258)(cid:261)(cid:222)(cid:242)(cid:250)(cid:281)(cid:193)(cid:290)(cid:263)(cid:268)(cid:264)(cid:258) OD\n(cid:293)(cid:245)(cid:261)(cid:277)(cid:181)(cid:245)(cid:293)(cid:181)(cid:213)(cid:197)(cid:261)(cid:261)(cid:197)(cid:245)(cid:197)(cid:245)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2024-on-33-q09",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2024-on-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q09",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n9 A veterinary surgery wants to create a class for individual pets.\nSIHT\nSome of the attributes required in the class are listed in the table.\nNI\nETIRW\nAttribute Data type Description\nPetID STRING unique ID assigned at registration TON\nOD PetType STRING type of pet assigned at registration\ntelephone number of owner assigned at\nOwnerTelephone STRING\nregistration\nNIGRAM\nDateRegistered DATE date of registration\nSIHT\n(a) State one reason why the attributes would be declared as PRIVATE.\nNI\nETIRW\n...................................................................................................................................................\nTON ............................................................................................................................................. [1]\nOD\n(b) Complete the class diagram for Pet, to include:\n• an attribute and data type for the name of the pet\n• an attribute and data type for the name of the owner\nNIGRAM\n• a method to create a Pet object and set attributes at the time of registration\n• a method to assign a pet ID\n• a method to assign the date of registration SIHT\n• a method to return the pet name\nNI\n• a method to return the owner’s telephone number.\nETIRW\nPet TON\nOD PetID : STRING\nPetType : STRING\nOwnerTelephone : STRING\nNIGRAM\nDateRegistered : DATE\nSIHT .............................................................. : ..............................................................\nNI\nETIRW .............................................................. : ..............................................................\nTON\n................................................................................................................................. OD\n.................................................................................................................................\n................................................................................................................................. NIGRAM\n.................................................................................................................................\nSIHT\n.................................................................................................................................\nNI\nETIRW\n[5]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:181)(cid:256)(cid:215) [Turn over © UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:218)(cid:244)(cid:208)(cid:292)(cid:254)(cid:245)(cid:219)(cid:264)(cid:263)(cid:208)(cid:277)(cid:282)(cid:211)(cid:268)(cid:248)(cid:258) OD\n(cid:293)(cid:245)(cid:245)(cid:213)(cid:245)(cid:277)(cid:261)(cid:213)(cid:197)(cid:181)(cid:213)(cid:261)(cid:197)(cid:277)(cid:229)(cid:181)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2024-on-33-q10",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2024-on-33-q10-p01.png",
        "9618-topic-16-system-software/assets/9618-2024-on-33-q10-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q10",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          13,
          14
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n10 Several syntax diagrams are shown.\nSIHT\nletter operator NI\nA + ETIRW\nTON\nE –\nOD\nI *\nNIGRAM\nO /\nSIHT\ndigit U NI\n0\nETIRW\nY TON\n1\nOD\nsymbol\n2 #\nNIGRAM\n3 $\nSIHT\n4 ? NI\nETIRW\n5 & TON\nOD\n6 @\nNIGRAM 7\nSIHT\n8\nNI\nETIRW\n9\nTON\nOD label\ndigit digit letter\nNIGRAM\nequation\nlabel operator label label =\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:183)(cid:254)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:220)(cid:243)(cid:205)(cid:296)(cid:266)(cid:275)(cid:228)(cid:249)(cid:241)(cid:179)(cid:221)(cid:292)(cid:291)(cid:180)(cid:240)(cid:258) OD\n(cid:293)(cid:229)(cid:293)(cid:213)(cid:181)(cid:245)(cid:197)(cid:181)(cid:245)(cid:245)(cid:261)(cid:197)(cid:197)(cid:213)(cid:197)(cid:245)(cid:245)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n(a) Complete the Backus-Naur Form (BNF) for the given syntax diagrams.\nSIHT\nNI <operator> ::= ..................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n<label> ::= .........................................................................................................................\nOD\n...................................................................................................................................................\n<equation> ::= ..................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT [4]\nNI\n(b) A new syntax rule, password, is required. It must begin with a letter or a symbol, followed by\nETIRW\na digit and end with one or two symbols.\nTON\n(i) Draw a syntax diagram for password.\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[3]\n(ii) Write the BNF for password.\nNIGRAM\n...........................................................................................................................................\n...........................................................................................................................................\nSIHT\nNI ...........................................................................................................................................\nETIRW\n..................................................................................................................................... [2]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(c"
    },
    {
      "id": "9618-2024-on-33-q11",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 12,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_33.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q11-p01.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q11-p02.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q11-p03.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q11-p04.png",
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2024-on-33-q11-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-33-q11",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_33.pdf?download=true",
        "source_pages": [
          15,
          16,
          17
        ],
        "marks": 12
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n11 The following diagram shows an ordered binary tree.\nSIHT\nNI\nRed ETIRW\nTON\nOD\nGreen Yellow\nNIGRAM\nBlue Orange Violet\nSIHT\nNI\nIndigo\nETIRW\nTON\n(a) A linked list of nodes is used to store the data. Each node consists of a left pointer , the data\nOD and a right pointer.\n–1 is used to represent a null pointer .\nNIGRAM Complete this linked list to represent the given binary tree.\nRootPtr\nSIHT\nNI\nETIRW\nLeftPtr Data RightPtr\nTON\nRed\nOD\nGreen\nNIGRAM\n–1 Blue –1\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\n[4]\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:183)(cid:256)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:219)(cid:241)(cid:213)(cid:300)(cid:248)(cid:294)(cid:226)(cid:257)(cid:263)(cid:237)(cid:219)(cid:184)(cid:277)(cid:228)(cid:248)(cid:258) OD\n(cid:293)(cid:277)(cid:197)(cid:277)(cid:181)(cid:277)(cid:229)(cid:245)(cid:261)(cid:229)(cid:229)(cid:197)(cid:261)(cid:181)(cid:261)(cid:181)(cid:245)(cid:213)\nNIGRAM\n13\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:4)(cid:44)\n(b) A user-defined record structure is used to store the nodes of the linked list in part (a).\nSIHT\nComplete the diagram, using your answer for part (a). NI\nETIRW\nRootPtr Index LeftPtr Data RightPtr\nTON\n0 Red 0\nOD\nGreen 1\nYellow 2\nNIGRAM\nBlue 3\nOrange 4 SIHT\nNI Indigo 5\nETIRW\nViolet FreePtr 6\nTON\n7\nOD\n[4]\n(c) The linked list in part (a) is implemented using a 1D array of records. Each record contains a\nleft pointer, data and a right pointer.\nNIGRAM\nThe following pseudocode represents a function that searches for an element in the array of\nrecords BinTree. It returns the index of the record if the element is found, or it returns a null\nSIHT\npointer if the element is not found.\nNI\nETIRW Complete the pseudocode for the function.\nTON\nFUNCTION SearchTree(Item : STRING) ........................................................................\nOD\n......................................................................................................................... NowPtr\nWHILE NowPtr <> -1\nNIGRAM\nIF ..................................................................................................................... THEN\nSIHT NowPtr BinTree[NowPtr].LeftPtr\nNI ELSE\nETIRW\nIF BinTree[NowPtr].Data < Item THEN\nTON\n.........................................................................................................................\nOD\nELSE\nRETURN NowPtr\nENDIF NIGRAM\nENDIF\nSIHT ENDWHILE\nRETURN NowPtr NI\nETIRW\nENDFUNCTION\n[4]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:183)(cid:256)(cid:215)\n© UCLES 2024 9618/33/O/N/24 (cid:300)(cid:257)(cid:220)(cid:242)(cid:205)(cid:286)(cid:252)(cid:278)(cid:215)(cid:247)(cid:250)(cid:1"
    },
    {
      "id": "9618-2024-on-41-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 22,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-on-41-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-on-41-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-on-41-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_41.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11
        ],
        "marks": 22
      },
      "text_excerpt": "A program sorts string data using different sorting methods. 1\nThe text file stores string data items. Each data item is on a new line in the text (a)\nData.txt\nfile.\nThe function :\nReadData()\n• has a local array of strings that can store 45 items\n• reads each line of data and stores it in the array\n• returns the array.\nWrite program code for the function .\nReadData()\nSave your program as Question1_N24.\nCopy and paste the program code into part in the evidence document. 1(a)\n[6]\n© UCLES 2024 9618/41/O/N/24\n3\nThe function takes an array of strings as a parameter. It concatenates the (b)\nFormatArray()\ncontents of the array into one string with a space between each array element. The function\nreturns the concatenated string.\nWrite program code for . (i)\nFormatArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[2]\nThe main program: (ii)\n• calls and stores the returned array\nReadData()\n• calls with the returned array and outputs the returned string.\nFormatArray()\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[3]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(b)(iii)\n[1]\n[Turn over © UCLES 2024 9618/41/O/N/24\n4\nThe function : (c)\nCompareStrings()\n• takes two strings as parameters\n• compares each string, one character at a time, to identify which string comes first\nalphabetically. If the first two characters are the same, the second character of each\nstring is compared. This continues until the two characters are different.\nThe function:\n• returns if the first parameter comes before the second alphabetically\n1\n• returns if the second parameter comes before the first alphabetically.\n2\nWrite program code for .\nCompareStrings()\nAssume that all strings are in lower case.\nAssume that a difference between two strings will always be identified before the end of one\nstring is reached.\nDo use an in-built string comparison function. not\nThe strings must be compared one character at a time.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[4]\n© UCLES 2024 9618/41/O/N/24\n5\nThe function takes an array of strings as a parameter and sorts the data into (d)\nBubble()\nascending alphabetical order, using a bubble sort. The bubble sort uses\nCompareStrings()\nto compare each string.\nThe function returns the sorted list.\nWrite program code for . (i)\nBubble()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(i)\n[3]\nWrite program code to amend the main program to: (ii)\n• call with the unsorted array as a parameter\nBubble()\n• call with the sorted array and output the returned string.\nFormatArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output.\nSave yo"
    },
    {
      "id": "9618-2024-on-41-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 34,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_41.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9,
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-on-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-on-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-on-41-q02-p04.png",
        "9618-practical-programming/assets/9618-2024-on-41-q02-p05.png",
        "9618-practical-programming/assets/9618-2024-on-41-q02-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_41.pdf?download=true",
        "source_pages": [
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ],
        "marks": 34
      },
      "text_excerpt": "A computer program is designed to simulate horses doing show jumping. In show jumping, horses 2\njump over obstacles called fences. A horse successfully jumps a fence if it does not knock the\nfence down.\nThe program is written using Object-Oriented Programming (OOP).\nThe class stores data about the horses.\nHorse\nHorse\nstores the name given to the horse\nName : STRING\nstores the maximum height in cm that the horse can\nMaxFenceHeight : INTEGER\njump, for example 132\nstores the percentage chance of a horse not knocking\nPercentageSuccess : INTEGER\ndown a fence, for example 70 represents a 70% chance\nof jumping a fence successfully\ninitialises , and\nName MaxFenceHeight Constructor()\nto its parameter values\nPercentageSuccess\nreturns the name of the horse\nGetName()\nreturns the maximum height the horse can jump\nGetMaxFenceHeight()\ncalculates and returns the percentage chance of a horse\nSuccess()\nsuccessfully jumping a specific fence\nWrite program code to declare the class and its constructor. (a) (i)\nHorse\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program as Question2_N24.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\nThe get methods and each return the relevant (ii)\nGetName() GetMaxFenceHeight()\nattribute.\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\n© UCLES 2024 9618/41/O/N/24\n7\nThe array stores objects of type . (b)\nHorses Horse\nThe program has two horses: (i)\n• The horse named ‘Beauty’ can jump a maximum height of 150 cm and has a success\npercentage rate of 72%.\n• The horse named ‘Jet’ can jump a maximum height of 160 cm and has a success\npercentage rate of 65%.\nWrite program code to:\n• declare the array, , local to the main program with space for two\nHorses Horse\nobjects\n• store the horses described in the array two\n• output the name of both objects from the array.\nHorse\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(i)\n[5]\nTest your program. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 2(b)(ii)\n[1]\n[Turn over © UCLES 2024 9618/41/O/N/24\n8\nThe class stores data about the fences. Each fence has a height in cm and a risk (c)\nFence\nnumber.\nThe risk is a whole number between 1 and 5 inclusive. A risk of means the fence is the\n1\neasiest type to jump. A risk of means the fence is the hardest type to jump.\n5\nFence\nstores the height of the fence in cm\nHeight : INTEGER\nthe height is between 70 and 180 inclusive\nstores the risk as a whole number between 1 and 5\nRisk : INTEGER\ninclusive\ninitialises and to its parameter values\nHeight Risk Constructor()\nreturns the height of the fence\nGetHeight()\nreturns the risk of the fence\nGetRisk()\nWrite program cod"
    },
    {
      "id": "9618-2024-on-41-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 19,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_41.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-on-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-on-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-on-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-on-41-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_41.pdf?download=true",
        "source_pages": [
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37
        ],
        "marks": 19
      },
      "text_excerpt": "A linked list stores positive integer data in a 2D array. The first dimension of the array stores the 3\ninteger data. The second dimension of the array stores the pointer to the next node in the linked\nlist.\nA linked list node with no data is initialised with the integer . These nodes are linked together as\n–1\nan empty list. A pointer of identifies that node as the last node.\n–1\nThe linked list can store 20 nodes.\nThe global 2D array stores the linked list.\nLinkedList\nis initialised as an empty list. The data in each node is initialised to . Each node’s\nLinkedList –1\npointer stores the index of the next node. The last node stores the pointer value , which indicates\n–1\nit is the last node.\nThe global variable stores the index of the first element in the empty list. This is the\nFirstEmpty\nfirst node in the empty linked list when it is initialised, which is index .\n0\nThe global variable stores the index of the first element in the linked list. There is no\nFirstNode\ndata in the linked list when it is initialised, so is initialised to .\nFirstNode –1\nThis diagram shows the content of the initialised array.\nFirstEmpty = 0\nFirstNode = –1\nIndex Data Pointer\n0 -1 1\n1 -1 2\n2 -1 3\n3 -1 4\n4 -1 5\n19 -1 -1\nWrite program code for the main program to declare and initialise , (a)\nLinkedList FirstNode\nand .\nFirstEmpty\nSave your program as Question3_N24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[2]\n© UCLES 2024 9618/41/O/N/24\n13\nThe procedure takes positive integers as input from the user and inserts (b) five\nInsertData()\nthese into the linked list.\nEach data item is inserted at the front of the linked list.\nThe table shows the steps to follow depending on the state of the linked list:\nLinked list state Steps\ninsert the data in the index pointed to by\nFirstEmpty\nnot full change the pointer to the index pointed to by\nFirstNode\nchange the values of and\nFirstNode FirstEmpty\nfull end the procedure\nAny node that is at the end of the linked list has a pointer of .\n–1\nWrite program code for .\nInsertData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[6]\n[Turn over © UCLES 2024 9618/41/O/N/24\n14\nThe procedure outputs the data in the linked list in order by following (c)\nOutputLinkedList()\nthe pointers from .\nFirstNode\nWrite program code for . (i)\nOutputLinkedList()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(i)\n[2]\nAmend the main program to call and then . (ii)\nInsertData() OutputLinkedList()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(ii)\n[1]\nTest your program with the test data: (iii)\n5 1 2 3 8\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 3(c)(iii)\n[1]\n© UCLES 2024 9618/41/O/N/24\n15\nThe procedure removes a node from the linked list. (d)\nRemoveData()\nThe procedure takes the data item to be removed from the linked list as a parame"
    },
    {
      "id": "9618-2024-on-42-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5,
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-on-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-on-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-on-42-q01-p04.png",
        "9618-practical-programming/assets/9618-2024-on-42-q01-p05.png",
        "9618-practical-programming/assets/9618-2024-on-42-q01-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_42.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17
        ],
        "marks": 29
      },
      "text_excerpt": "A computer game is designed for users to select characters. Each character can take part in a 1\ngroup of events. Each group has five events. There are four types of event: jump, swim, run, drive.\nThe program is written using object-oriented programming.\nThe class stores data about the events. (a)\nEventItem\nEventItem\nstores the name of the event\nEventName : STRING\nstores the type of event, either: jump, swim, run or drive\nType : STRING\nstores the difficulty of the event from 1 (easiest) to 5\nDifficulty : INTEGER\n(hardest)\ninitialises , and to its\nConstructor() EventName Type Difficulty\nparameter values\nreturns the name of the event\nGetName()\nreturns the difficulty of the event\nGetDifficulty()\nreturns the type of event\nGetEventType()\nWrite program code to declare the class and its constructor. (i)\nEventItem\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nAll attributes must be private.\nIf you are writing in Python, include attribute declarations, using comments.\nSave your program as Question1_N24.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[4]\n© UCLES 2024 9618/42/O/N/24\n3\nThe get methods , and each return (ii)\nGetName() GetDifficulty() GetEventType()\nthe relevant attribute.\nWrite program code for the get methods. three\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[3]\nThe array stores five objects of type . (b)\nGroup EventItem\nWrite program code to declare local to the main program. (i)\nGroup\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[1]\nOne group has the following events: (ii)\nEvent name Event type Event difficulty\nBridge jump 3\nWater wade swim 4\n100 mile run run 5\nGridlock drive 2\nWall on wall jump 4\nWrite program code to create an instance of for each of the events, and five\nEventItem\nstore them in .\nGroup\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[3]\n[Turn over © UCLES 2024 9618/42/O/N/24\n4\nThe class stores data about the characters in the game. (c)\nCharacter\nEach character has a skill level for each type of event. The skill level is an integer between\n1 and 5 inclusive. Skill level 1 is the lowest skill level, and skill level 5 is the highest skill level.\nCharacter\nstores the name of the character CharacterName : STRING\nstores the character’s skill level at events of type jump Jump : INTEGER\nstores the character’s skill level at events of type swim Swim : INTEGER\nstores the character’s skill level at events of type run Run : INTEGER\nstores the character’s skill level at events of type drive Drive : INTEGER\ninitialises , , , and Constructor() CharacterName Jump Swim Run\nto its parameter values\nDrive\nreturns the name of the character GetName()\ntakes the type of event and difficulty as parameters. CalculateScore()\nCalculates and returns the chance of the character\ncompleting the event\nWrite program code to declare th"
    },
    {
      "id": "9618-2024-on-42-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_42.pdf?download=true",
      "source_pages": [
        8,
        9,
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-on-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-on-42-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-on-42-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_42.pdf?download=true",
        "source_pages": [
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30
        ],
        "marks": 29
      },
      "text_excerpt": "A linear queue data structure is designed using a record structure. 2\nThe record structure has the following fields:\nQueue\n• , a 1D array of up to 100 integer values\nQueueArray\n• , a variable that stores the index of the first data item in\nHeadpointer QueueArray\n• , a variable that stores the index of the next free location in .\nTailpointer QueueArray\nWrite program code to declare the record structure and its fields. (a)\nQueue\nIf your programming language does support record structures, a class can be declared not\ninstead.\nIf you are writing in Python, use comments to declare the appropriate data types.\nSave your program as Question2_N24.\nCopy and paste the program code into part in the evidence document. 2(a)\n[3]\nThe main program creates a new record with the identifier . The head (b)\nQueue TheQueue\npointer is initialised to –1. The tail pointer is initialised to 0. Each element in the array is\ninitialised with –1.\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[3]\n© UCLES 2024 9618/42/O/N/24\n9\nThe pseudocode function inserts an integer value into the queue. (c)\nEnqueue()\nThe function is incomplete. There are incomplete statements. three\nFUNCTION Enqueue(BYREF AQueue : Queue, BYVAL TheData : INTEGER)\nRETURNS INTEGER\nIF AQueue.Headpointer = -1 THEN\n........................................ ←\nAQueue.QueueArray[AQueue.Tailpointer]\n←\n0 AQueue.Headpointer\n←\nAQueue.Tailpointer + 1 AQueue.Tailpointer\nRETURN 1\nELSE\n........................................\nIF AQueue.Tailpointer > THEN\nRETURN -1\nELSE\n←\nTheData AQueue.QueueArray[AQueue.Tailpointer]\n........................................ ←\nAQueue.Tailpointer AQueue.Tailpointer\nRETURN 1\nENDIF\nENDIF\nENDFUNCTION\nWrite program code for .\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[5]\nThe function accesses . It concatenates all the integer (d)\nReturnAllData() TheQueue\nvalues that have been inserted into the queue’s array, starting from the value stored at\n, with a space between each integer value. The string of concatenated values\nHeadPointer\nis returned.\nNone of the integer values are removed from the queue.\nWrite program code for .\nReturnAllData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)\n[3]\n[Turn over © UCLES 2024 9618/42/O/N/24\n10\nThe main program asks the user to enter 10 integers with values of 0 or greater. It reads (e) (i)\neach input repeatedly until a valid number is entered.\nAll 10 valid inputs are added to the queue, using .\nEnqueue()\nIf the value returned from is –1, a message is output to state that the queue\nEnqueue()\nis full, otherwise a message is output to state that the item has been added to the queue.\nThe function is called once all 10 integers have been entered and\nReturnAllData()\nthe return value from the function call is output.\nAmend the main program to perform these actions.\nSave your program.\n"
    },
    {
      "id": "9618-2024-on-42-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 17,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_42.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-on-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-on-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-on-42-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-on-42-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_42.pdf?download=true",
        "source_pages": [
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          39
        ],
        "marks": 17
      },
      "text_excerpt": "The text file stores the top seven player scores for a game. 3\nHighScoreTable.txt\nThe data in the file is stored in the order:\nPlayer ID\nGame level\nScore\nEach item of data is stored on a new line. For example, the first set of data in the file is:\nPlayer ID: GHEH\nGame level: 3\nScore: 10\nThe data about the players and their scores is stored in a 2D array of strings with the identifier (a)\n.\nHighScores\nThe first dimension of the array has seven elements: one for each player. The second\ndimension of the array has three elements: one for the player ID, one for the game level and\none for the score. All data is stored in the array as strings.\nis declared local to the main program, and all elements are initialised to an\nHighScores\nempty string, for example .\n\" \"\nWrite program code to declare and initialise .\nHighScores\nSave your program as Question3_N24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[2]\nThe function reads the data from and stores the data (b)\nReadData() HighScoreTable.txt\nin a 2D array. The function returns the 2D array.\nThe function uses exception handling when opening and reading data from the file.\nWrite program code for .\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[5]\n© UCLES 2024 9618/42/O/N/24\n13\nThe procedure takes a 2D array as a parameter. It outputs each (c)\nOutputHighScores()\nplayer’s ID, level and score in the order they are in the array. The outputs are in the format:\nGHEH reached level 3 with a score of 10\nWrite program code for .\nOutputHighScores()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)\n[2]\nThe scores in are in order. (d) not\nHighScoreTable.txt\nThe player scores are first sorted by the game level they reached. For example, all players\nthat reached level 5 are higher in the high score table than players that reached level 4.\nThe players that reached the same level are then sorted in descending order of score.\nAn example sorted high score table is:\nPosition Player ID Game level Score\n1 GFED 5 25\n2 HJKM 4 21\n3 RERR 4 19\n4 TTYU 4 15\n5 WSVG 3 20\n6 PPTR 3 15\n7 SNQT 2 10\nThe function uses a bubble sort to sort the data as described and returns the\nSortScores()\nsorted array.\nWrite program code for .\nSortScores()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(d)\n[4]\n[Turn over © UCLES 2024 9618/42/O/N/24\n14\nAmend the main program to implement these steps in the order given: (e) (i)\n• call and store the returned array in\nReadData() HighScores\n• output\n\"Before\"\n• call with as a parameter\nOutputHighScores() HighScores\n• call and store the returned array in\nSortScores() HighScores\n• output\n\"After\"\n• call with as a parameter.\nOutputHighScores() HighScores\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(e)(i)\n[2]\nTest your program (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot i"
    },
    {
      "id": "9618-2024-on-43-q01",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 22,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2024-on-43-q01-p02.png",
        "9618-practical-programming/assets/9618-2024-on-43-q01-p03.png",
        "9618-practical-programming/assets/9618-2024-on-43-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_43.pdf?download=true",
        "source_pages": [
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11
        ],
        "marks": 22
      },
      "text_excerpt": "A program sorts string data using different sorting methods. 1\nThe text file stores string data items. Each data item is on a new line in the text (a)\nData.txt\nfile.\nThe function :\nReadData()\n• has a local array of strings that can store 45 items\n• reads each line of data and stores it in the array\n• returns the array.\nWrite program code for the function .\nReadData()\nSave your program as Question1_N24.\nCopy and paste the program code into part in the evidence document. 1(a)\n[6]\n© UCLES 2024 9618/43/O/N/24\n3\nThe function takes an array of strings as a parameter. It concatenates the (b)\nFormatArray()\ncontents of the array into one string with a space between each array element. The function\nreturns the concatenated string.\nWrite program code for . (i)\nFormatArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(i)\n[2]\nThe main program: (ii)\n• calls and stores the returned array\nReadData()\n• calls with the returned array and outputs the returned string.\nFormatArray()\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)(ii)\n[3]\nTest your program. (iii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(b)(iii)\n[1]\n[Turn over © UCLES 2024 9618/43/O/N/24\n4\nThe function : (c)\nCompareStrings()\n• takes two strings as parameters\n• compares each string, one character at a time, to identify which string comes first\nalphabetically. If the first two characters are the same, the second character of each\nstring is compared. This continues until the two characters are different.\nThe function:\n• returns if the first parameter comes before the second alphabetically\n1\n• returns if the second parameter comes before the first alphabetically.\n2\nWrite program code for .\nCompareStrings()\nAssume that all strings are in lower case.\nAssume that a difference between two strings will always be identified before the end of one\nstring is reached.\nDo use an in-built string comparison function. not\nThe strings must be compared one character at a time.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[4]\n© UCLES 2024 9618/43/O/N/24\n5\nThe function takes an array of strings as a parameter and sorts the data into (d)\nBubble()\nascending alphabetical order, using a bubble sort. The bubble sort uses\nCompareStrings()\nto compare each string.\nThe function returns the sorted list.\nWrite program code for . (i)\nBubble()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(i)\n[3]\nWrite program code to amend the main program to: (ii)\n• call with the unsorted array as a parameter\nBubble()\n• call with the sorted array and output the returned string.\nFormatArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)(ii)\n[2]\nTest your program. (iii)\nTake a screenshot of the output.\nSave yo"
    },
    {
      "id": "9618-2024-on-43-q02",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 34,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_43.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9,
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2024-on-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2024-on-43-q02-p03.png",
        "9618-practical-programming/assets/9618-2024-on-43-q02-p04.png",
        "9618-practical-programming/assets/9618-2024-on-43-q02-p05.png",
        "9618-practical-programming/assets/9618-2024-on-43-q02-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_43.pdf?download=true",
        "source_pages": [
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ],
        "marks": 34
      },
      "text_excerpt": "A computer program is designed to simulate horses doing show jumping. In show jumping, horses 2\njump over obstacles called fences. A horse successfully jumps a fence if it does not knock the\nfence down.\nThe program is written using Object-Oriented Programming (OOP).\nThe class stores data about the horses.\nHorse\nHorse\nstores the name given to the horse\nName : STRING\nstores the maximum height in cm that the horse can\nMaxFenceHeight : INTEGER\njump, for example 132\nstores the percentage chance of a horse not knocking\nPercentageSuccess : INTEGER\ndown a fence, for example 70 represents a 70% chance\nof jumping a fence successfully\ninitialises , and\nName MaxFenceHeight Constructor()\nto its parameter values\nPercentageSuccess\nreturns the name of the horse\nGetName()\nreturns the maximum height the horse can jump\nGetMaxFenceHeight()\ncalculates and returns the percentage chance of a horse\nSuccess()\nsuccessfully jumping a specific fence\nWrite program code to declare the class and its constructor. (a) (i)\nHorse\nDo declare the other methods. not\nUse your programming language’s appropriate constructor.\nAll attributes must be private. If you are writing in Python, include attribute declarations\nusing comments.\nSave your program as Question2_N24.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\nThe get methods and each return the relevant (ii)\nGetName() GetMaxFenceHeight()\nattribute.\nWrite program code for the get methods.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\n© UCLES 2024 9618/43/O/N/24\n7\nThe array stores objects of type . (b)\nHorses Horse\nThe program has two horses: (i)\n• The horse named ‘Beauty’ can jump a maximum height of 150 cm and has a success\npercentage rate of 72%.\n• The horse named ‘Jet’ can jump a maximum height of 160 cm and has a success\npercentage rate of 65%.\nWrite program code to:\n• declare the array, , local to the main program with space for two\nHorses Horse\nobjects\n• store the horses described in the array two\n• output the name of both objects from the array.\nHorse\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(i)\n[5]\nTest your program. (ii)\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 2(b)(ii)\n[1]\n[Turn over © UCLES 2024 9618/43/O/N/24\n8\nThe class stores data about the fences. Each fence has a height in cm and a risk (c)\nFence\nnumber.\nThe risk is a whole number between 1 and 5 inclusive. A risk of means the fence is the\n1\neasiest type to jump. A risk of means the fence is the hardest type to jump.\n5\nFence\nstores the height of the fence in cm\nHeight : INTEGER\nthe height is between 70 and 180 inclusive\nstores the risk as a whole number between 1 and 5\nRisk : INTEGER\ninclusive\ninitialises and to its parameter values\nHeight Risk Constructor()\nreturns the height of the fence\nGetHeight()\nreturns the risk of the fence\nGetRisk()\nWrite program cod"
    },
    {
      "id": "9618-2024-on-43-q03",
      "subject": "9618",
      "year": 2024,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 19,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_qp_43.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2024-oct-nov/qp/9618_w24_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2024-on-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2024-on-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2024-on-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2024-on-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2024-on-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2024-on-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2024-oct-nov/ms/9618_w24_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2024-Oct-Nov/9618_w24_ms_43.pdf?download=true",
        "source_pages": [
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37
        ],
        "marks": 19
      },
      "text_excerpt": "A linked list stores positive integer data in a 2D array. The first dimension of the array stores the 3\ninteger data. The second dimension of the array stores the pointer to the next node in the linked\nlist.\nA linked list node with no data is initialised with the integer . These nodes are linked together as\n–1\nan empty list. A pointer of identifies that node as the last node.\n–1\nThe linked list can store 20 nodes.\nThe global 2D array stores the linked list.\nLinkedList\nis initialised as an empty list. The data in each node is initialised to . Each node’s\nLinkedList –1\npointer stores the index of the next node. The last node stores the pointer value , which indicates\n–1\nit is the last node.\nThe global variable stores the index of the first element in the empty list. This is the\nFirstEmpty\nfirst node in the empty linked list when it is initialised, which is index .\n0\nThe global variable stores the index of the first element in the linked list. There is no\nFirstNode\ndata in the linked list when it is initialised, so is initialised to .\nFirstNode –1\nThis diagram shows the content of the initialised array.\nFirstEmpty = 0\nFirstNode = –1\nIndex Data Pointer\n0 -1 1\n1 -1 2\n2 -1 3\n3 -1 4\n4 -1 5\n19 -1 -1\nWrite program code for the main program to declare and initialise , (a)\nLinkedList FirstNode\nand .\nFirstEmpty\nSave your program as Question3_N24.\nCopy and paste the program code into part in the evidence document. 3(a)\n[2]\n© UCLES 2024 9618/43/O/N/24\n13\nThe procedure takes positive integers as input from the user and inserts (b) five\nInsertData()\nthese into the linked list.\nEach data item is inserted at the front of the linked list.\nThe table shows the steps to follow depending on the state of the linked list:\nLinked list state Steps\ninsert the data in the index pointed to by\nFirstEmpty\nnot full change the pointer to the index pointed to by\nFirstNode\nchange the values of and\nFirstNode FirstEmpty\nfull end the procedure\nAny node that is at the end of the linked list has a pointer of .\n–1\nWrite program code for .\nInsertData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[6]\n[Turn over © UCLES 2024 9618/43/O/N/24\n14\nThe procedure outputs the data in the linked list in order by following (c)\nOutputLinkedList()\nthe pointers from .\nFirstNode\nWrite program code for . (i)\nOutputLinkedList()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(i)\n[2]\nAmend the main program to call and then . (ii)\nInsertData() OutputLinkedList()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(ii)\n[1]\nTest your program with the test data: (iii)\n5 1 2 3 8\nTake a screenshot of the output.\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 3(c)(iii)\n[1]\n© UCLES 2024 9618/43/O/N/24\n15\nThe procedure removes a node from the linked list. (d)\nRemoveData()\nThe procedure takes the data item to be removed from the linked list as a parame"
    },
    {
      "id": "9618-2025-mj-31-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 A programmer is writing a program to manage bookings for a small taxi compan.y The programmer\nSIHT\nrequires some user-defined data types.\nNI\nETIRW\n(a) Write a pseudocode statement to declare the enumerated data type, Vehicle, to hold the\nidentity code of each of the company’s taxis:\nTON\nM100, M230, T101, T102, T120, T150\nOD\n...................................................................................................................................................\n............................................................................................................................................. [2]\nNIGRAM\n(b) Write pseudocode statements to declare the composite data type, Booking, to hold data\nabout taxi bookings. The data required includes: SIHT\nNI\n• booking number (any combination of letters and numbers)\nETIRW\n• destination\n• client name\nTON\n• client telephone number\n• OD date of departure\n• address for pick-up\n• the identity code of the taxi used.\nNIGRAM Use the most appropriate data type in each case, including the enumerated data type from\npart (a).\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ............................................................................................................................................. [4]\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:240)(cid:251)(cid:219)(cid:289)(cid:290)(cid:248)(cid:236)(cid:249)(cid:241)(cid:216)(cid:277)(cid:186)(cid:245)(cid:201)(cid:280)(cid:258) OD\n(cid:293)(cid:277)(cid:245)(cid:277)(cid:245)(cid:213)(cid:293)(cid:213)(cid:213)(cid:213)(cid:181)(cid:197)(cid:261)(cid:213)(cid:229)(cid:277)(cid:245)(cid:213)"
    },
    {
      "id": "9618-2025-mj-31-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-mj-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer using binary floating-point representation with:\nSIHT\n• NI 10 bits for the mantissa\nETIRW • 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Write the normalised floating-point representation of the following binary number using this\nOD\nsystem.\n0.00000011010111\nNIGRAM\nSIHT\nMantissa Exponent NI\nETIRW\n[2]\nTON\nOD (b) Calculate the normalised binary floating-point representation of –25.3125 in this system.\nShow your working.\nMantissa Exponent\nNIGRAM\nSIHT\nNI\nWorking .....................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\n[4]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:183)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:239)(cid:252)(cid:211)(cid:295)(cid:286)(cid:264)(cid:205)(cid:255)(cid:256)(cid:273)(cid:193)(cid:194)(cid:225)(cid:201)(cid:296)(cid:258) OD\n(cid:293)(cid:277)(cid:261)(cid:213)(cid:181)(cid:181)(cid:261)(cid:181)(cid:197)(cid:229)(cid:293)(cid:197)(cid:261)(cid:181)(cid:197)(cid:213)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2025-mj-31-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-mj-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n3 (a) The Application Layer and Transport Layer are two layers of the TCP/IP protocol suite.\nSIHT\nNI Describe the purpose of the Application Layer and the purpose of the Transport Layer.\nETIRW\nPurpose of Application Layer ....................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\nPurpose of Transport Layer ......................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM [5]\n(b) Describe packet switching as a method of transmitting messages across the internet.\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................."
    },
    {
      "id": "9618-2025-mj-31-q04",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        5,
        6
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q04-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q04-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q04",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n4 (a) A linked list of nodes is used to store an ordered list of integers. Each node consists of the\nSIHT\ndata, a left pointer and a right pointer, for example:\nNI\nETIRW Left pointer Data Right pointer\n20\nTON\nOD\nThe linked list will be organised as a binary tree.\n−1 is used to represent a null pointer .\nNIGRAM\nComplete the binary tree, including null pointers, to show how the data will be organised after\nthe following integers have been added:\nSIHT\n6, 15, 41, 66\nNI\nETIRW\nRoot pointer\nTON\nOD\nNIGRAM\n36\nSIHT\nNI\nETIRW\n12 40\nTON\nOD\n– 1 3\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\n(b) Describe what is meant by recursion.\nNIGRAM\n...................................................................................................................................................\nSIHT ...................................................................................................................................................\nNI\n...................................................................................................................................................\nETIRW\n............................................................................................................................................. [2]\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:183)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:240)(cid:250)(cid:219)(cid:299)(cid:276)(cid:241)(cid:207)(cid:247)(cid:250)(cid:207)(cid:183)(cid:278)(cid:215)(cid:217)(cid:288)(cid:258) OD\n(cid:293)(cid:229)(cid:229)(cid:277)(cid:181)(cid:213)(cid:293)(cid:245)(cid:181)(cid:245)(cid:197)(cid:197)(cid:197)(cid:213)(cid:261)(cid:277)(cid:293)(cid:213)\nNIGRAM\n6\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n(c) A binary tree is a suitable Abstract Data Type (ADT) that a designer can implement using\nSIHT\nrecursive algorithms.\nNI\nETIRW\nIdentify one other ADT that a designer can implement using recursive algorithms.\nTON ............................................................................................................................................. [1]\nOD"
    },
    {
      "id": "9618-2025-mj-31-q05",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-31-q05-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-31-q05-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q05",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 8
      },
      "text_excerpt": "OD\n5 This truth table represents a logic circuit.\nNIGRAM INPUT OUTPUT\nA B C D Z\nSIHT\n0 0 0 0 1\nNI\n0 0 0 1 0 ETIRW\n0 0 1 0 0\nTON\n0 0 1 1 0\nOD\n0 1 0 0 0\n0 1 0 1 1\nNIGRAM 0 1 1 0 0\n0 1 1 1 1\nSIHT\n1 0 0 0 1\nNI\n1 0 0 1 0 ETIRW\n1 0 1 0 0\nTON\n1 0 1 1 0\nOD\n1 1 0 0 0\n1 1 0 1 1\nNIGRAM\n1 1 1 0 0\n1 1 1 1 1\nSIHT\n(a) Write the Boolean logic expression that correspo nds to the given truth table as the NI\nETIRW sum-of-products.\nTON Z = ............................................................................................................................................\nOD\n............................................................................................................................................. [2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:182)(cid:254)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:239)(cid:250)(cid:216)(cid:289)(cid:252)(cid:251)(cid:215)(cid:244)(cid:267)(cid:230)(cid:215)(cid:286)(cid:182)(cid:241)(cid:272)(cid:258) OD\n(cid:293)(cid:245)(cid:261)(cid:277)(cid:181)(cid:245)(cid:293)(cid:213)(cid:245)(cid:277)(cid:293)(cid:197)(cid:261)(cid:213)(cid:229)(cid:213)(cid:181)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) (i) Complete the Karnaugh map (K-map) for the given truth table.\nSIHT\nAB NI\nETIRW\n01 11 10 00\nCD\nTON\n00 OD\n01\nNIGRAM\n11\nSIHT\n10\nNI\nETIRW\n[2]\nTON\n(ii) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal\nOD\nsum-of-products. [2]\n(iii) Write the Boolean logic expression from your answer to part (b)(ii) as the simplified\nsum-of-products.\nNIGRAM\nZ = .....................................................................................................................................\nSIHT\n..................................................................................................................................... [2]\nNI\nETIRW"
    },
    {
      "id": "9618-2025-mj-31-q06",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-31-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q06",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 4
      },
      "text_excerpt": "ETIRW\n6 Describe the process of executing a program using an interpreter.\nTON\n..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n.................................................................................................................................................... [4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:182)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:240)(cid:249)(cid:208)(cid:295)(cid:248)(cid:267)(cid:226)(cid:262)(cid:246)(cid:291)(cid:259)(cid:278)(cid:290)(cid:241)(cid:288)(cid:258) OD\n(cid:293)(cid:245)(cid:245)(cid:213)(cid:245)(cid:277)(cid:261)(cid:181)(cid:293)(cid:293)(cid:181)(cid:197)(cid:261)(cid:181)(cid:197)(cid:277)(cid:229)(cid:213)"
    },
    {
      "id": "9618-2025-mj-31-q07",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-31-q07-p01.png",
        "9618-topic-16-system-software/assets/9618-2025-mj-31-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q07",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n7 Several syntax diagrams are shown.\nSIHT\nNI uppercase lowercase\nA b ETIRW\nTON\nC d\nOD\nE f\nNIGRAM\nG h\nSIHT\nNI J k\nETIRW\nTON\nsymbol digit OD\n$ 0\n@ 1\nNIGRAM\n# 2 SIHT\nNI\nETIRW\n3 &\nTON\nOD 4 %\n5\nNIGRAM\n6\nSIHT\nNI\nETIRW 7\nTON\n8\nOD\n9\nlowercase\nNIGRAM\npasscode\nuppercase symbol\nSIHT\nNI\ndigit\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:182)(cid:256)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:240)(cid:252)(cid:208)(cid:285)(cid:262)(cid:254)(cid:213)(cid:268)(cid:237)(cid:300)(cid:225)(cid:186)(cid:196)(cid:289)(cid:280)(cid:258) OD\n(cid:293)(cid:197)(cid:229)(cid:213)(cid:181)(cid:277)(cid:261)(cid:277)(cid:261)(cid:197)(cid:197)(cid:197)(cid:197)(cid:181)(cid:293)(cid:277)(cid:181)(cid:213)\nNIGRAM\n9\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n(a) State why each passcode is invalid for the given syntax diagrams.\nSIHT\n#Jd7 NI\nETIRW\nReason .....................................................................................................................................\nTON\n...................................................................................................................................................\nOD\nC%6A\nReason .....................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[2] SIHT\nNI\n(b) Complete the Backus-Naur Form (BNF) for <uppercase> and <passcode>.\nETIRW\n<uppercase> ::= .................................................................................................................\nTON\nOD ...................................................................................................................................................\n<passcode> ::= ...................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n.................................................................................................................................................."
    },
    {
      "id": "9618-2025-mj-31-q08",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n8 (a) Describe what is meant by multi-tasking and how it benefits process management.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................. [2]\nNIGRAM\n(b) Explain the function of the shortest remaining time scheduling routine and give a benefit of\nthis routine. SIHT\nNI\nFunction ....................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nBenefit ...................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\n[4] TON\nOD"
    },
    {
      "id": "9618-2025-mj-31-q09",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-mj-31-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q09",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 4
      },
      "text_excerpt": "OD\n9 Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.\n(a) State two functions of SSL/TLS.\nNIGRAM\n1 ................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n2 ................................................................................................................................................\nTON\n...................................................................................................................................................\n[2] OD\n(b) Give two examples of situations where the use of SSL/TLS would be appropriate.\n1 ................................................................................................................................................ NIGRAM\n...................................................................................................................................................\nSIHT\n2 ................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\n[2]\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:184)(cid:254)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:237)(cid:252)(cid:213)(cid:287)(cid:254)(cid:284)(cid:219)(cid:259)(cid:246)(cid:194)(cid:189)(cid:188)(cid:232)(cid:217)(cid:288)(cid:258) OD\n(cid:293)(cid:277)(cid:197)(cid:277)(cid:181)(cid:277)(cid:229)(cid:277)(cid:229)(cid:245)(cid:197)(cid:261)(cid:197)(cid:277)(cid:293)(cid:277)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-mj-31-q10",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        11
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2025-mj-31-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q10",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n10 (a) Describe the purpose of a graph when used in an Artificial Intelligence (AI) system.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [2]\n(b) Explain the use of artificial neural networks in Deep Learning.\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [4]\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:238)(cid:251)(cid:205)(cid:297)(cid:258)(cid:300)(cid:222)(cid:245)(cid:267)(cid:263)(cid:281)(cid:196)(cid:244)(cid:217)(cid:272)(cid:258) OD\n(cid:293)(cid:277)(cid:181)(cid:213)(cid:245)(cid:245)(cid:197)(cid:245)(cid:181)(cid:261)(cid:277)(cid:261)(cid:197)(cid:245)(cid:261)(cid:213)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2025-mj-31-q11",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-31-q11-p01.png",
        "9618-topic-20-further-programming/assets/9618-2025-mj-31-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q11",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n11 (a) A medical centre uses objects of the class Appointment to record treatments given and\nSIHT\nmedication prescribed during each doctor ’s appointment. Some of the attributes required in\nNI the class are listed in the table.\nETIRW\nAttribute Data type Description\nTON\nDateSeen DATE date of treatment\nOD\nTreatments STRING treatments given\nMedications STRING medications prescribed\nNIGRAM\nPatients are identified by a unique 8-digit number , beginning with the patient’ s year of birth,\nfor example, 20108989.\nSIHT\nDoctors are identified by their name, for example, A N Other.\nNI\nETIRW Complete the class diagram for Appointment, to include:\n• attribute and data type for the identification of the patient TON\n• attribute and data type for the identification of the doctor\nOD\n• methods to assign date seen, treatments given and medications prescribed\n• method to return the date seen and the attributes for the patient and the doctor.\nAppointment\nNIGRAM\nDateSeen : DATE\nSIHT\n.......................................................... : .............................................................................\nNI\nETIRW\n.......................................................... : .............................................................................\nTON\nTreatments : STRING\nOD\nMedications : STRING\n............................................................................................................................................\nNIGRAM\nSetPatientID(PatientNumber : INTEGER)\nSIHT\nSetDoctor(DoctorID : STRING)\nNI\nETIRW\n............................................................................................................................................\nTON\n............................................................................................................................................\nOD\n............................................................................................................................................\n............................................................................................................................................\nNIGRAM\n............................................................................................................................................\nSIHT\nGetTreatments()\nNI\nGetMedications() ETIRW\n[5]\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:238)(cid:250)(cid:205)(cid:291)(cid:244)(cid:285)(cid:217)(cid:251)(cid:260)(cid:256)(cid:187)(cid:288)(cid:210)(cid:201)(cid:296)(cid:258) OD\n(cid:293)(cid:229)(cid:293)(cid:213)(cid:181)(cid:245)(cid:197)(cid:213)(cid:213)(cid:229)(cid:293)(cid:261)(cid:261)(cid:245)(cid:229)(cid:213)(cid:261)(cid:213)\nNIGRAM\n13\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9"
    },
    {
      "id": "9618-2025-mj-31-q12",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "31",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_31.pdf?download=true",
      "source_pages": [
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q12-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q12-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-31-q12-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-31-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_31.pdf?download=true",
        "source_pages": [
          15
        ],
        "marks": 5
      },
      "text_excerpt": "ETIRW\n12 The pseudocode algorithm checks whether a location in a stock file StockList.dat is empty\nor not. The location is given by the user. If the location is empty, a suitable message is displayed,\nTON\notherwise the item stored at that location is displayed.\nOD\nComplete this file-handling pseudocode algorithm.\nDECLARE Location : INTEGER\nNIGRAM DECLARE Item : STRING\nDECLARE Continue : BOOLEAN\nDECLARE Answer : CHAR\nSIHT\nTRUE Continue\nNI\nETIRW OPENFILE .......................................................................................................................................\nWHILE Continue\nOUTPUT \"Enter a location between 1 and 500: \" TON\nINPUT Location\nOD\n....................................................................................................................................................\nGETRECORD ..............................................................................................................................\nNIGRAM\nIF Item = \"\" THEN\nOUTPUT \"This record is missing.\"\nELSE\nSIHT\nOUTPUT \"The item in stock is \", ........................................................................\nNI ENDIF\nETIRW\nOUTPUT \"Another location (Y or N)?\"\nINPUT Answer\nTON\nIF Answer <> 'Y' THEN\nFALSE Continue OD\nENDIF\nENDWHILE\n.......................................................................................................................................................... NIGRAM\nOUTPUT \"End of program\"\n[5]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:237)(cid:249)(cid:213)(cid:293)(cid:240)(cid:269)(cid:224)(cid:253)(cid:237)(cid:201)(cid:287)(cid:280)(cid:262)(cid:201)(cid:280)(cid:258) OD\n(cid:293)(cid:229)(cid:277)(cid:277)(cid:245)(cid:277)(cid:229)(cid:181)(cid:197)(cid:213)(cid:181)(cid:261)(cid:261)(cid:277)(cid:197)(cid:277)(cid:277)(cid:213)\nNIGRAM\n14\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:5)(cid:44)\nBLANK PAGE\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:250)(cid:181)(cid:258)(cid:215)\n© UCLES 2025 9618/31/M/J/25 (cid:300)(cid:196)(cid:238)(cid:251)(cid:216)(cid:299)(cid:259)(cid:293)(cid:206)(cid:267)(cid:250)(cid:294)(cid:195)(cid:189)(cid:258)(cid:249)(cid:272)(cid:258) OD\n(cid:293)(cid:261)(cid:277)(cid:213)(cid:181)(cid:245)(cid:293)(cid:277)(cid:229)(cid:197)(cid:181)(cid:197)(cid:197)(cid:213)(cid:293)(cid:213)(cid:197)(cid:213)\nNIGRAM\n15\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:6)(cid:44)\nBLANK PAGE\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nN"
    },
    {
      "id": "9618-2025-mj-32-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          4
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 Data types can be defined using pseudocode.\nSIHT\nThe composite record data type, Departure, is used to represent flights from Cambridge Airport NI\nETIRW and is defined in pseudocode as:\nTYPE Departure TON\nDECLARE FlightNumber : STRING\nOD\nDECLARE Destination : STRING\nDECLARE FlightDate : DATE\nDECLARE Gate : STRING\nDECLARE Airline : STRING\nNIGRAM\nENDTYPE\nA variable, Flight1, is declared in pseudocode as:\nSIHT\nDECLARE Flight1 : Departure NI\nETIRW\n(a) Write pseudocode to store the following details to Flight1:\nTON\nField Data\nOD\nFlightNumber SB2789\nDestination Dublin\nNIGRAM\nFlightDate 30/07/2025\nGate N03\nSIHT\nAirline Cambridge Airways NI\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\n(b) The data type for Gate is changed to an enumerated data type, GateID.\nTON\n(i) Write a pseudocode statement to declare GateID to hold the identity codes for the\nOD airport gates:\nN01, N02, N03, W01, W02, W03, W04\nNIGRAM ...........................................................................................................................................\n..................................................................................................................................... [2]\nSIHT\n(ii) Write the new pseudocode statement required to replace the declaration of Gate in NI\nETIRW Departure.\n..................................................................................................................................... [1] TON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:238)(cid:242)(cid:208)(cid:286)(cid:274)(cid:249)(cid:210)(cid:265)(cid:237)(cid:230)(cid:174)(cid:293)(cid:185)(cid:297)(cid:272)(cid:258) OD\n(cid:293)(cid:213)(cid:277)(cid:277)(cid:181)(cid:181)(cid:293)(cid:277)(cid:229)(cid:197)(cid:261)(cid:261)(cid:261)(cid:245)(cid:197)(cid:181)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-mj-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          4,
          5
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer using binary floating-point representation with:\nSIHT\n• NI 12 bits for the mantissa\nETIRW • 4 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the normalised binary floating-point representation of +124.4375 in this system.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\nSIHT\nWorking .....................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[3]\nSIHT\n(b) Calculate the denary value of the following normalised binary floating-point number.\nNI\nShow your working.\nETIRW\nMantissa Exponent\nTON\n1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0\nOD\nWorking .....................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\nDenary value ............................................................................................................................\nOD\n[3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:183)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:237)(cid:241)(cid:216)(cid:300)(cid:270)(cid:265)(cid:231)(cid:239)(cid:260)(cid:291)(cid:298)(cid:269)(cid:285)(cid:297)(cid:288)(cid:258) OD\n(cid:293)(cid:213)(cid:293)(cid:213)(cid:245)(cid:213)(cid:261)(cid:245)(cid:181)(cid:181)(cid:213)(cid:261)(cid:261)(cid:277)(cid:229"
    },
    {
      "id": "9618-2025-mj-32-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-mj-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          5
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n3 (a) Identify two different layers of the TCP/IP protocol suite.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n............................................................................................................................................. [1]\nTON\n(b) Describe how the TCP/IP protocol suite is applied when a message is sent through the\nOD\ninternet from one host to another . Do not describe the function of individual layers of the\nTCP/IP protocol suite.\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n............................................................................................................................................. [4]"
    },
    {
      "id": "9618-2025-mj-32-q04",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-mj-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 4
      },
      "text_excerpt": "4 Circuit switching may be used as a method of data transmission.\nNIGRAM\nState two benefits and two drawbacks of circuit switching.\nSIHT\nBenefit 1 ...........................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\nTON\nBenefit 2 ...........................................................................................................................................\nOD\n..........................................................................................................................................................\nDrawback 1 ......................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT Drawback 2 ......................................................................................................................................\nNI\n.......................................................................................................................................................... ETIRW\n[4]\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:183)(cid:256)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:237)(cid:244)(cid:216)(cid:290)(cid:288)(cid:256)(cid:212)(cid:241)(cid:267)(cid:300)(cid:204)(cid:177)(cid:191)(cid:249)(cid:280)(cid:258) OD\n(cid:293)(cid:293)(cid:181)(cid:213)(cid:181)(cid:213)(cid:261)(cid:213)(cid:213)(cid:277)(cid:229)(cid:261)(cid:197)(cid:277)(cid:261)(cid:245)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q05",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n5 The management and scheduling of processes are tasks carried out by an operating system.\nSIHT\n(a) Identify three process states. NI\nETIRW\n1 ................................................................................................................................................\nTON\n2 ................................................................................................................................................\nOD\n3 ................................................................................................................................................\n[3]\nNIGRAM (b) Describe the function of the shortest job first scheduling routine and give a benefit of this\nroutine.\nSIHT Function ....................................................................................................................................\nNI\n...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\nBenefit ......................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n[4]\nETIRW"
    },
    {
      "id": "9618-2025-mj-32-q06",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2025-mj-32-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q06",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "ETIRW\nTON 6 (a) Describe the structure of a graph as used in an Artificial Intelligence (AI) system.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n............................................................................................................................................. [2]\nSIHT\n(b) Explain how supervised learning and unsupervised learning differ from each other. NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n............................................................................................................................................. [4] TON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:183)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:238)(cid:243)(cid:208)(cid:296)(cid:292)(cid:240)(cid:229)(cid:263)(cid:246)(cid:221)(cid:272)(cid:201)(cid:283)(cid:249)(cid:296)(cid:258) OD\n(cid:293)(cid:293)(cid:197)(cid:277)(cid:245)(cid:181)(cid:293)(cid:181)(cid:197)(cid:293)(cid:245)(cid:261)(cid:197)(cid:245)(cid:293)(cid:181)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q07",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-32-q07-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-32-q07-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q07",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n7 The diagram shows a logic circuit.\nSIHT\nNI A\nQ\nETIRW\nTON\nOD\nB\nNIGRAM\nS\nP SIHT\nC\nNI\nETIRW\nZ\nR\nTON\nD\nOD\n(a) Complete the truth table for the given logic circuit.\nShow your working.\nNIGRAM\nWorking space\nSIHT\nA B C D P Q R S Z\nNI\n0 0 0 0 ETIRW\n0 0 0 1\nTON\n0 0 1 0\nOD\n0 0 1 1\n0 1 0 0\nNIGRAM\n0 1 0 1\n0 1 1 0 SIHT\nNI 0 1 1 1\nETIRW\n1 0 0 0\nTON\n1 0 0 1\nOD\n1 0 1 0\n1 0 1 1\nNIGRAM\n1 1 0 0\n1 1 0 1\nSIHT\n1 1 1 0\nNI\nETIRW\n1 1 1 1\n[3] TON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:182)(cid:254)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:237)(cid:243)(cid:211)(cid:286)(cid:268)(cid:246)(cid:221)(cid:260)(cid:263)(cid:216)(cid:240)(cid:177)(cid:250)(cid:209)(cid:280)(cid:258) OD\n(cid:293)(cid:181)(cid:293)(cid:277)(cid:245)(cid:277)(cid:293)(cid:277)(cid:261)(cid:261)(cid:213)(cid:261)(cid:261)(cid:245)(cid:197)(cid:245)(cid:197)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) Write the Boolean logic expression that corresponds to the given logic circuit as the\nSIHT\nsum-of-products.\nNI\nETIRW\nZ = ............................................................................................................................................\nTON ............................................................................................................................................. [1]\nOD\n(c) Use Boolean algebra including De Morgan’s laws to simplify the following expression.\nShow all working.\nB) . (A . B + B . C) (A +\nNIGRAM\nWorking .....................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\nSimplified expression ................................................................................................................\nSIHT\n...................................................................................................................................................\n[4] NI\nETIRW"
    },
    {
      "id": "9618-2025-mj-32-q08",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 4
      },
      "text_excerpt": "ETIRW\n8 Explain what is meant by lexical analysis during program compilation. TON\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\n..........................................................................................................................................................\nSIHT\nNI ..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\n.......................................................................................................................................................... OD\n.................................................................................................................................................... [4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:182)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:238)(cid:244)(cid:219)(cid:300)(cid:264)(cid:262)(cid:220)(cid:246)(cid:250)(cid:273)(cid:236)(cid:201)(cid:222)(cid:209)(cid:296)(cid:258) OD\n(cid:293)(cid:181)(cid:277)(cid:213)(cid:181)(cid:245)(cid:261)(cid:245)(cid:277)(cid:245)(cid:261)(cid:261)(cid:261)(cid:277)(cid:229)(cid:181)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q09",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-32-q09-p01.png",
        "9618-topic-16-system-software/assets/9618-2025-mj-32-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n9 Several syntax diagrams are shown.\nSIHT\nNI letter digit\nA 0 ETIRW\nTON\nB 1\nOD\nC 2\nNIGRAM\nD 3\nSIHT\nNI\nE 4\nETIRW\nTON\nF 5\nOD\nG 6\nNIGRAM\nH 7\nSIHT\nNI\nJ 8\nETIRW\nTON\nK 9\nOD\noperator\n+\nNIGRAM\n–\nSIHT\nNI\nETIRW\n*\nTON\n/ OD\nletter\nvariable\nletter digit ^\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:182)(cid:256)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:238)(cid:241)(cid:219)(cid:290)(cid:246)(cid:259)(cid:223)(cid:252)(cid:241)(cid:282)(cid:266)(cid:293)(cid:256)(cid:193)(cid:272)(cid:258) OD\n(cid:293)(cid:261)(cid:197)(cid:213)(cid:245)(cid:245)(cid:261)(cid:213)(cid:245)(cid:213)(cid:245)(cid:261)(cid:197)(cid:277)(cid:261)(cid:181)(cid:197)(cid:213)\nNIGRAM\n9\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n(a) State why 9K is not a valid variable for the given syntax diagrams.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n............................................................................................................................................. [1]\nTON\n(b) Complete the Backus-Naur Form (BNF) for <operator>.\nOD\n<operator> ::= ..................................................................................................................\n............................................................................................................................................. [1]\nNIGRAM\n(c) An expression is defined as follows:\nSIHT\n• A variable is assigned to a variable followed by an operator followed by another variable.\nNI\n• The operator and final variable stage can be repeated as many times as necessary.\nETIRW\nComplete the syntax diagram for an expression.\nTON\nOD\nexpression\n= variable\nNIGRAM\nSIHT\n[3]\nNI\nETIRW\n(d) A character can be a letter or a digit.\nTON\nAn additional constraint has been applied to the definition of variable. It must comply with the\nOD given syntax diagram, but it will only pass validation if it has at least four characters.\nState one example of a valid variable.\nNIGRAM ...................................................................................................................................................\n............................................................................................................................................. [1]\nSIHT\nNI"
    },
    {
      "id": "9618-2025-mj-32-q10",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-mj-32-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q10",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 4
      },
      "text_excerpt": "NI\nETIRW 10 Identify the two main protocols that form Transport Layer Security (TLS) and state the purpose of\neach.\nTON\nProtocol 1 .........................................................................................................................................\nOD\nPurpose ............................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\nProtocol 2 .........................................................................................................................................\nSIHT\nPurpose ............................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\n[4]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:182)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:237)(cid:242)(cid:211)(cid:296)(cid:250)(cid:243)(cid:218)(cid:254)(cid:256)(cid:207)(cid:206)(cid:269)(cid:220)(cid:193)(cid:288)(cid:258) OD\n(cid:293)(cid:261)(cid:181)(cid:277)(cid:181)(cid:277)(cid:293)(cid:181)(cid:293)(cid:229)(cid:229)(cid:261)(cid:197)(cid:245)(cid:293)(cid:245)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q11",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q11-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n11 (a) A linked list of nodes is used to store an ordered list of strings. Each node consists of the\nSIHT\ndata, a left pointer and a right pointer.\nNI\nETIRW Left pointer Data Right pointer\nPp\nTON\nOD\nThe linked list will be organised as a binary tree.\n0 is used to represent a null pointer .\nNIGRAM\nComplete the binary tree, including null pointers, to show how the data will be organised after\nthe following strings have been added:\nSIHT\nAa, Mm, Ss, Xx NI\nETIRW\nRoot pointer\nTON\nOD\nNIGRAM Pp\nSIHT\nNI\nGg Rr ETIRW\nTON\nOD\n0 Kk\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:184)(cid:254)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:239)(cid:241)(cid:210)(cid:292)(cid:238)(cid:277)(cid:225)(cid:243)(cid:250)(cid:180)(cid:294)(cid:295)(cid:300)(cid:249)(cid:296)(cid:258) OD\n(cid:293)(cid:213)(cid:229)(cid:277)(cid:245)(cid:245)(cid:229)(cid:213)(cid:213)(cid:293)(cid:245)(cid:197)(cid:197)(cid:181)(cid:261)(cid:181)(cid:245)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n(b) A binary tree can be used to implement recursion.\nSIHT\nNI Identify one feature of an algorithm that makes it beneficial to use recursion.\nETIRW\nGive one example of an application that could use a recursive algorithm.\nTON Feature .....................................................................................................................................\nOD\n...................................................................................................................................................\nExample ....................................................................................................................................\n[2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:240)(cid:242)(cid:218)(cid:294)(cid:242)(cid:293)(cid:216)(cid:261)(cid:263)(cid:245)(cid:178)(cid:271)(cid:176)(cid:249)(cid:280)(cid:258) OD\n(cid:293)(cid:213)(cid:213)(cid:213)(cid:181)(cid:277)(cid:197)(cid:181)(cid:197)(cid:277)(cid:229)(cid:197)(cid:197)(cid:213)(cid:293)(cid:245)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2025-mj-32-q12",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 12,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        12,
        13
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-32-q12-p01.png",
        "9618-topic-20-further-programming/assets/9618-2025-mj-32-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q12",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n12 (a) A medical clinic uses objects of the class Patient to assign a priority and a doctor to a\nSIHT\npatient. Some of the attributes required in the class are listed in the table.\nNI\nETIRW\nAttribute Data type Description\nTON\nPatientID STRING Unique identifier of the patient\nOD\nName STRING Patient’s full name, surname first\nDoctorID STRING ID of doctor administering treatment\nNIGRAM\nT reatment is prioritised with a numeric scale of 1 to 5.\nComplete the class diagram for Patient, to include: SIHT\nNI\n• attribute and data type for the date of birth\nETIRW\n• attribute and data type for the priority\n• methods to assign the patient ID, priority and doctor ID\nTON\n• methods to return the patient ID, patient date of birth and the priority.\nOD\nPatient\nPatientID : STRING\nNIGRAM\nName : STRING\nSIHT\n.......................................................: ....................................................................\nNI\nETIRW .......................................................: ....................................................................\nDoctorID : STRING TON\nOD\n................................................................................................................................\nSetName(FullName : STRING) NIGRAM\nSetDateOfBirth(DOB : DATE)\nSIHT\n................................................................................................................................\nNI\nETIRW\n................................................................................................................................\nTON\n................................................................................................................................\nOD\nGetName()\n................................................................................................................................\nNIGRAM\n................................................................................................................................\nSIHT\nGetDoctorID()\nNI\n[5]\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:240)(cid:243)(cid:218)(cid:288)(cid:260)(cid:292)(cid:227)(cid:267)(cid:256)(cid:238)(cid:276)(cid:179)(cid:270)(cid:297)(cid:288)(cid:258) OD\n(cid:293)(cid:293)(cid:261)(cid:213)(cid:245)(cid:277)(cid:197)(cid:277)(cid:229)(cid:181)(cid:213)(cid:197)(cid:261)(cid:213)(cid:197)(cid:245)(cid:245)(cid:213)\nNIGRAM\n13\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:4)(cid:44)\n(b) (i) Identify the object-oriented programming (OOP) term described as ‘an occurrence of an\nSIHT\nobject’.\nNI\nETIRW\n..................................................................................................................................... [1]\nT"
    },
    {
      "id": "9618-2025-mj-32-q13",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "32",
      "question_number": 13,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_32.pdf?download=true",
      "source_pages": [
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q13-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q13-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q13-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-32-q13-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-32-q13",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_32.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 5
      },
      "text_excerpt": "ETIRW\n13 The pseudocode algorithm below uses random file access to copy 50 records from a live file\nCurrentResults.dat to a stored file StoredResults.dat one record at a time. It uses the\nTON\nuser-defined type StudentResult.\nOD\nTYPE StudentResult\nDECLARE LastName : STRING\nDECLARE FirstName : STRING\nNIGRAM DECLARE ExamGrade : STRING\nENDTYPE\nSIHT\nIf any grades are missing in CurrentResults.dat, the text \"Missing grade\" is added to the\nExamGrade field in StoredResults.dat NI\nETIRW\nComplete this file handling pseudocode algorithm.\nTON\nDECLARE Grade : StudentResult\nOD\nDECLARE Position : INTEGER\n..........................................................................................................................................................\nNIGRAM\nOPENFILE \"StoredResults.dat\" FOR RANDOM\n..........................................................................................................................................................\nSIHT\nNI SEEK \"CurrentResults.dat\", Position\nETIRW\nGETRECORD \"CurrentResults.dat\", Grade\nIF Grade.ExamGrade = \"\" THEN\nTON\n............................................................................................................................................. OD\nENDIF\n.................................................................................................................................................... NIGRAM\n....................................................................................................................................................\nSIHT\nNEXT Position\nNI\nCLOSEFILE \"CurrentResults.dat\" ETIRW\nCLOSEFILE \"StoredResults.dat\"\n[5]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:239)(cid:244)(cid:210)(cid:298)(cid:256)(cid:276)(cid:214)(cid:237)(cid:241)(cid:187)(cid:200)(cid:203)(cid:202)(cid:297)(cid:272)(cid:258) OD\n(cid:293)(cid:293)(cid:245)(cid:277)(cid:181)(cid:245)(cid:229)(cid:245)(cid:181)(cid:197)(cid:261)(cid:197)(cid:261)(cid:181)(cid:229)(cid:181)(cid:293)(cid:213)\nNIGRAM\n14\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:5)(cid:44)\nBLANK PAGE\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:252)(cid:181)(cid:258)(cid:215)\n© UCLES 2025 9618/32/M/J/25 (cid:300)(cid:200)(cid:240)(cid:242)(cid:211)(cid:296)(cid:243)(cid:300)(cid:232)(cid:251)(cid:246)(cid:280)(cid:300)(cid:274)(cid:190)(cid:217)(cid:280)(cid:258) OD\n(cid:293)(cid:197)(cid:245)(cid:213)(cid:245)(cid:277)(cid:293)(cid:213)(cid:213)(cid:213)(cid:261)(cid:261)(cid:197)(cid:245)(cid:261)(cid:245)(cid:181)(cid:213)\nNIGRAM\n15\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1"
    },
    {
      "id": "9618-2025-mj-33-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-33-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 A programmer is writing a program to manage a video library . They require a user-defined data\nSIHT\ntype.\nNI\nETIRW\n(a) Write pseudocode statements to declare the composite data type VideoLibrary to hold\ndata about each video in the collection. This data includes:\nTON\n• identity code (any combination of letters and numbers)\nOD\n• title\n• year released\n• date purchased\n• format (for example DVD, Blu-ray, 4K, MP4)\nNIGRAM\n• running time (minutes)\nUse the most appropriate data type in each case. SIHT\nNI\n...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n............................................................................................................................................. [4]\nTON\n(b) Identify one field in VideoLibrary that could be an efficient enumerated data type and give\nOD\na reason for your choice.\nField ..........................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nReason .....................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n[2]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:250)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:243)(cid:250)(cid:212)(cid:285)(cid:238)(cid:278)(cid:232)(cid:241)(cid:265)(cid:277)(cid:296)(cid:212)(cid:262)(cid:185)(cid:296)(cid:258) OD\n(cid:293)(cid:293)(cid:197)(cid:213)(ci"
    },
    {
      "id": "9618-2025-mj-33-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-mj-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer using binary floating-point representation with:\nSIHT\n• NI 8 bits for the mantissa\nETIRW • 8 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Give the largest normalised positive two’ s complement binary number that can be stored in\nOD\nthis system and state its denary equivalent.\nThe denary answer should be expressed in terms of powers of 2.\nNIGRAM\nMantissa Exponent\nSIHT\nNI\nETIRW\nTON\nDenary ...................................................................................................................................... OD\n[2]\n(b) Calculate the normalised binary floating-point representation of –3.59375 in this system.\nShow your working. NIGRAM\nMantissa Exponent\nSIHT\nNI\nETIRW\nTON\nWorking .....................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:252)(cid:183)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:244)(cid:249)(cid:220)(cid:299)(cid:242)(cid:294)(cid:209)(cid:263)(cid:248)(cid:212)(cid:180)(cid:236)(cid:210)(cid:185)(cid:280)(cid:258) OD\n(cid:293)(cid:293)(cid:181)(cid:277)(cid:181)(cid:245)(cid:261)(cid:277)(cid:213)(cid:229)(cid:181)(cid:261)(cid:197)(cid:245)(cid:197)(cid:277)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-33-q03-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-mj-33-q03-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q03",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          7,
          8,
          9
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n3 This truth table represents a logic circuit.\nSIHT\nNI\nINPUT OUTPUT\nETIRW\nA B C D Z\nTON\n0 0 0 0 0\nOD\n0 0 0 1 0\n0 0 1 0 1\n0 0 1 1 1 NIGRAM\n0 1 0 0 1\nSIHT\n0 1 0 1 0\nNI\n0 1 1 0 0 ETIRW\n0 1 1 1 0\nTON\n1 0 0 0 0\nOD\n1 0 0 1 0\n1 0 1 0 1\nNIGRAM 1 0 1 1 1\n1 1 0 0 1\nSIHT\n1 1 0 1 0\nNI\n1 1 1 0 0 ETIRW\n1 1 1 1 0\nTON\nOD (a) Write the Boolean logic expression that correspo nds to the given truth table as the\nsum-of-products.\nZ = ............................................................................................................................................\nNIGRAM\n............................................................................................................................................. [2]\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:250)(cid:183)(cid:256)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:244)(cid:252)(cid:220)(cid:289)(cid:260)(cid:291)(cid:230)(cid:265)(cid:239)(cid:219)(cid:274)(cid:264)(cid:244)(cid:233)(cid:288)(cid:258) OD\n(cid:293)(cid:213)(cid:293)(cid:277)(cid:245)(cid:245)(cid:261)(cid:181)(cid:181)(cid:261)(cid:197)(cid:261)(cid:261)(cid:245)(cid:293)(cid:277)(cid:277)(cid:213)\nNIGRAM\n5\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n(b) (i) Complete the Karnaugh map (K-map) for the given truth table.\nSIHT\nNI\nAB\nETIRW\n01 11 10 00\nCD\nTON\nOD\n00\n01\nNIGRAM\n11\nSIHT\nNI 10\nETIRW\nTON\n[2]\nOD\n(ii) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal\nsum-of-products. [2]\nNIGRAM\n(iii) Write the Boolean logic expression from your answer to part (b)(ii) as the simplified\nsum-of-products.\nSIHT\nZ = .....................................................................................................................................\nNI\nETIRW\n..................................................................................................................................... [2]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:252)(cid:183)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:243)(cid:251)(cid:212)(cid:295)(cid:256)(cid:275)(cid:211)(cid:239)(cid:258)(cid:270)(cid:198)(cid:240)(cid:232)(cid:233)(cid:272)(cid:258) OD\n(cid:293)(cid:213)(cid:277)(cid:213)(cid:181)(cid:277)(cid:293)(cid:213)(cid:229)(cid:245)(cid:277)(cid:261)(cid:261)(cid:277)(cid:261)(cid:213)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q04",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-mj-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          9
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n4 (a) The Internet layer and Link layer are two layers of the TCP/IP protocol suite.\nSIHT\nNI Describe the purpose of the Internet layer and the purpose of the Link layer.\nETIRW\nPurpose of Internet layer ..........................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\nPurpose of Link layer ................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM [5]\n(b) Describe the function of a router in packet switching.\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n........................................................................."
    },
    {
      "id": "9618-2025-mj-33-q05",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-mj-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q05",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n5 Complete the table by filling in the missing object-oriented programming (OOP) terms and\nSIHT\ndescriptions.\nNI\nETIRW\nOOP term Description\nTON\nA method that accesses the value of a property.\n......................................\nOD\nA method that changes the value of a property.\n......................................\nNIGRAM\n.................................................................................................\nObject\nSIHT .................................................................................................\nNI\n................................................................................................. ETIRW\nTON .................................................................................................\nOD\nMethod\n.................................................................................................\n.................................................................................................\n[4] NIGRAM"
    },
    {
      "id": "9618-2025-mj-33-q06",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-33-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q06",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\nSIHT\n6 The management and scheduling of processes are tasks carried out by an operating system.\nNI\n(a) Describe one reason why scheduling is necessary in process management. ETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ............................................................................................................................................. [2]\n(b) Explain the function of the round robin scheduling routine and give a benefit of this routine.\nSIHT\nFunction .................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\nBenefit ...................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\n[4] TON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:250)(cid:182)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:243)(cid:252)(cid:215)(cid:299)(cid:300)(cid:297)(cid:222)(cid:254)(cid:254)(cid:226)(cid:242)(cid:240)(cid:273)(cid:257)(cid:272)(cid:258) OD\n(cid:293)(cid:261)(cid:197)(cid:277)(cid:245)(cid:213)(cid:261)(cid:277)(cid:245)(cid:293)(cid:293)(cid:261)(cid:197)(cid:245)(cid:197)(cid:213)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q07",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-mj-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q07",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n7 Secure Socket Layer (SSL) and Transport Layer Security (TLS) are two protocols.\nSIHT\nNI Explain how SSL/TLS is used when client-server communication is initiated.\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\nTON\n.................................................................................................................................................... [4]\nOD"
    },
    {
      "id": "9618-2025-mj-33-q08",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-33-q08-p01.png",
        "9618-topic-16-system-software/assets/9618-2025-mj-33-q08-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          11
        ],
        "marks": 4
      },
      "text_excerpt": "8 Explain the process of syntax analysis during program compilation.\nNIGRAM ..........................................................................................................................................................\n..........................................................................................................................................................\nSIHT\n.......................................................................................................................................................... NI\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n.................................................................................................................................................... [4]\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:252)(cid:182)(cid:256)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:243)(cid:249)(cid:215)(cid:289)(cid:282)(cid:288)(cid:217)(cid:260)(cid:261)(cid:233)(cid:212)(cid:212)(cid:179)(cid:273)(cid:296)(cid:258) OD\n(cid:293)(cid:181)(cid:277)(cid:277)(cid:181)(cid:213)(cid:261)(cid:181)(cid:277)(cid:197)(cid:277)(cid:261)(cid:261)(cid:245)(cid:293)(cid:213)(cid:213)(cid:213)\nNIGRAM\n9\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\nBLANK PAGE\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:250)(cid:182)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:244)(cid:250)(cid:207)(cid:295)(cid:278)(cid:272)(cid:224)(cid:246)(cid:252)(cid:288)(cid:264)(cid:236)(cid:295)(cid:273)(cid:280)(cid:258) OD\n(cid:293)(cid:181)(cid:293)(cid:213)(cid:245)(cid:181)(cid:293)(cid:213)(cid:261)(cid:181)(cid:197)(cid:261)(cid:261)(cid:277)(cid:261)(cid:277)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q09",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-mj-33-q09-p01.png",
        "9618-topic-16-system-software/assets/9618-2025-mj-33-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q09",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n9 Several syntax diagrams are shown.\nSIHT\nNI\nupper digit\nETIRW J 0\nTON\nK 1\nOD\n2 L\nNIGRAM\n3 V\nSIHT\nNI\n4 X\nETIRW\nTON\n5 Z\nOD\nlower 6\na\nNIGRAM\n7\ne\nSIHT\n8 NI\ni\nETIRW\n9 TON\np\nOD\nu\nNIGRAM\ny\nSIHT\nNI\nETIRW\nlower lower\nTON\npasscode\nupper digit digit digit\nOD\n(a) State why JJ90 is not a valid passcode for the given syntax diagrams.\nNIGRAM\n...................................................................................................................................................\nSIHT ............................................................................................................................................. [1]\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:252)(cid:184)(cid:254)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:242)(cid:249)(cid:206)(cid:291)(cid:274)(cid:250)(cid:215)(cid:267)(cid:254)(cid:259)(cid:176)(cid:210)(cid:215)(cid:233)(cid:272)(cid:258) OD\n(cid:293)(cid:293)(cid:245)(cid:213)(cid:181)(cid:213)(cid:229)(cid:181)(cid:181)(cid:245)(cid:277)(cid:197)(cid:261)(cid:213)(cid:293)(cid:213)(cid:293)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n(b) Complete the Backus-Naur Form (BNF) for <upper> and <passcode>.\nSIHT\nNI <upper> ::= ..........................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n<passcode> ::= ...................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT [3]\nNI\n(c) A character can be an upper, a lower or a digit.\nETIRW\nThe rules for passcode have been changed so that the third character may also be selected\nTON\nfrom upper and the final character may be repeated one or more times.\nOD\nComplete the syntax diagram for passcode to show these changes.\nNIGRAM\nlower lower\nSIHT\npasscode\nNI upper digit digit digit\nETIRW\nTON\nOD\n[2]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:250)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200"
    },
    {
      "id": "9618-2025-mj-33-q10",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        12
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2025-mj-33-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q10",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n10 (a) State the purpose of the A* and Dijkstra’s algorithms.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n............................................................................................................................................. [1]\nTON\n(b) Outline the difference between the A* and Dijkstra’s algorithms.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [2]\nNI\nETIRW\n(c) Explain how unsupervised learning takes place in machine learning.\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ............................................................................................................................................. [3]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:252)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:241)(cid:251)(cid:214)(cid:287)(cid:288)(cid:255)(cid:213)(cid:243)(cid:252)(cid:189)(cid:202)(cid:262)(cid:225)(cid:185)(cid:280)(cid:258) OD\n(cid:293)(cid:213)(cid:213)(cid:277)(cid:181)(cid:181)(cid:197)(cid:245)(cid:197)(cid:229)(cid:181)(cid:197)(cid:197)(cid:181)(cid:229)(cid:277)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q11",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        13
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-33-q11-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:4)(cid:44)\n11 The pseudocode algorithm below allows a user to input a new stock item. The random file is\nSIHT\nsearched for the next empty location in the file and the new item is inserted there.\nNI A suitable message is displayed if the file is full.\nETIRW\nComplete this pseudocode.\nTON\nDECLARE Location : INTEGER\nOD\nDECLARE NewStock : STRING\nDECLARE CurrentStock : STRING\nDECLARE Stored : BOOLEAN\nDECLA←RE Max : INTEGER\nNIGRAM\n←100000 Max\nFALSE Stored ←\n1 Location SIHT\nNI\n..........................................................................................................................................................\nETIRW\nOUTPUT \"Enter the new item you wish to store: \"\nINPUT NewStock\nTON\nWHILE NOT Stored AND Location <= Max\nOD\n....................................................................................................................................................\nGETRECORD \"StockList.dat\", ..........................................................................................\nNIGRAM IF CurrentStock = \"\" THEN\n...............←....................................................................... \"StockList.dat\", NewStock\nSIHT\nTRUE Stored\nELSE ← NI\nETIRW Location + 1 Location\nENDIF\nENDWHILE TON\nOD\n................................................................................................................................................ THEN\nOUTPUT \"The new item has not been stored as the file was full.\"\nENDIF\nCLOSEFILE \"StockList.dat\"\nNIGRAM\n[5]\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:250)(cid:184)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:242)(cid:252)(cid:206)(cid:297)(cid:292)(cid:239)(cid:228)(cid:261)(cid:261)(cid:268)(cid:270)(cid:238)(cid:245)(cid:185)(cid:296)(cid:258) OD\n(cid:293)(cid:213)(cid:229)(cid:213)(cid:245)(cid:213)(cid:229)(cid:277)(cid:213)(cid:213)(cid:293)(cid:197)(cid:197)(cid:213)(cid:197)(cid:213)(cid:245)(cid:213)"
    },
    {
      "id": "9618-2025-mj-33-q12",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        14,
        15
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-33-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-33-q12-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          15
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:5)(cid:44)\n12 (a) An array is an Abstract Data Type (ADT).\nSIHT\nNI Identify two other ADTs.\nETIRW\n1 ................................................................................................................................................\nTON\n2 ................................................................................................................................................\nOD\n[1]\n(b) A 1D array DataArray holds up to 1000 elements of type integer and needs to be sorted in\nascending order.\nNIGRAM\nW rite the pseudocode for an insertion sort to sort the array into ascending order.\nSIHT\nUse the identifiers from the table in your algorithm.\nNI\nETIRW\nY ou do not need to declare any arrays or variables for this algorithm. You may assume this\nhas already been done.\nTON\nOD\nIdentifier Data type Description\nIndex INTEGER counter for outer loop\nPosition INTEGER counter for inner loop – insertion position\nNIGRAM\nDataArray INTEGER 1D array to store up to 1000 integers\nSIHT Value INTEGER value to insert\nNI\nETIRW The first line has been written for you.\n←\n2 to 1000 FOR Index TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n................................................................................................................................................... SIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n............................................................................................................................................. [4]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:181)(cid:258)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:241)(cid:250)(cid:207)(cid:295)(cid:271)(cid:263)"
    },
    {
      "id": "9618-2025-mj-33-q13",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 3,
      "variant": "33",
      "question_number": 13,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 114,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_33.pdf?download=true",
      "source_pages": [
        16
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-mj-33-q13-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-33-q13",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_33.pdf?download=true",
        "source_pages": [
          16
        ],
        "marks": 114
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:7)(cid:44)\n13 The recursive procedure Delete() is defined as follows:\nSIHT\nNI PROCEDURE Delete(Index, Target)\nETIRW\nIF Numbers[Index] > 0 THEN\nIF Numbers[Index] >←= Target THEN\nTON Numbers[Index + 1] Numbers[Index]\nENDIF ←\nOD\nIndex + 1 Index\nCALL Delete(Index, Target)\nENDIF\nENDPROCEDURE\nNIGRAM\nAn array Numbers is used to store a sorted data set of non-zero positive integers.\nUnused cells contain zero. SIHT\nNI\nThe contents of the array at the start of the algorithm are:\nETIRW\nNumbers TON\n[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] OD\n2 3 7 11 15 17 19 23 0 0\nComplete the trace table for the algorithm for the procedure call:\nNIGRAM\nCALL Delete(1, 15)\nSIHT\nNumbers\nNI\nETIRW\nIndex Target [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]\nTON 2 3 7 11 15 17 19 23 0 0\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\nNIGRAM\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every\nreasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the\npublisher will be pleased to make amends at the earliest possible opportunity.\nSIHT\nTo avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge\nNI Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download\nat www.cambridgeinternational.org after the live examination series. ETIRW\nCambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge\nLocal Examinations Syndicate (UCLES), which is a department of the University of Cambridge. TON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:181)(cid:260)(cid:215)\n© UCLES 2025 9618/33/M/J/25 (cid:300)(cid:200)(cid:242)(cid:252)(cid:215)(cid:299)(cid:289)(cid:242)(cid:212)(cid:251)(cid:248)(cid:297)(cid:200)(cid:243)(cid:263)(cid:281)(cid:296)(cid:258) OD\n(cid:293)(cid:197)(cid:261)(cid:213)(cid:181)(cid:213)(cid:261)(cid:245)(cid:197)(cid:277)(cid:197)(cid:261)(cid:197)(cid:245)(cid:229)(cid:213)(cid:229)(cid:213)"
    },
    {
      "id": "9618-2025-mj-41-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_41.pdf?download=true",
        "source_pages": [
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17
        ],
        "marks": 20
      },
      "text_excerpt": "Green.txt Orange.txt Pink.txt Red.txt Yellow.txt\nA program stores positive integers in a circular queue. 1\nThe queue is stored as a global 1D array of 20 integers with the identifier . Each index is\nQueue\ninitialised with the data\n–1\nThe global variable , initialised to , points to the first element in the queue.\nHeadPointer –1\nThe global variable , initialised to , points to the last element in the queue.\nTailPointer –1\nThe global variable , initialised to , stores the number of items in the queue.\nNumberItems 0\nWrite program code to declare and initialise , , and (a)\nQueue HeadPointer TailPointer\nNumberItems\nSave your program as Question1_J25.\nCopy and paste the program code into part in the evidence document. 1(a)\n[2]\nThe function : (b)\nEnqueue()\n• takes an integer as a parameter\n• checks if the queue is full\n• returns if the queue is full\nFALSE\n• stores the parameter in the next position in the queue and returns if the queue is\nTRUE\nfull not\n• updates the appropriate pointers and\nNumberItems\nWrite program code for\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[6]\n© UCLES 2025 9618/41/M/J/25\n3\nThe main program: (c)\n• attempts to store each of the integers 1 to 25 (inclusive) in the queue in ascending\nnumerical order using\nEnqueue()\n• outputs the integer that was passed to and if it was stored\nEnqueue() \"Successful\"\nin the queue, or if it was stored in the queue. not\n\"Unsuccessful\"\nFor example:\nif the integer 5 is passed to and is stored in the queue, the output will  Enqueue()\nbe:\n\"5 Successful\"\nif the integer 23 is passed to and is stored in the queue, the output not  Enqueue()\nwill be:\n\"23 Unsuccessful\"\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[3]\nThe function returns if the queue is empty. If the queue is empty, the (d) not\nDequeue() –1\nfunction returns the next item in the queue, updates the appropriate pointers and updates\nNumberItems\nWrite program code for\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)\n[6]\nWrite program code to extend the main program to call twice and output the (e) (i)\nDequeue()\nreturn value each time.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(i)\n[2]\nTest your program. (ii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(e)(ii)\n[1]\n[Turn over © UCLES 2025 9618/41/M/J/25"
    },
    {
      "id": "9618-2025-mj-41-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q02-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_41.pdf?download=true",
        "source_pages": [
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29
        ],
        "marks": 25
      },
      "text_excerpt": "A program reads data from a text file, splits the data depending on its content and stores the 2\nseparated data into different files.\nThe text file contains 72 lines of data. Each line of data has an integer number and\nTheData.txt\na string colour that are separated by a comma. For example, the first line in the file is:\n10,red\nThe integer is and the string is\n10 \"red\"\nThe file contains six different colours: red, green, blue, orange, yellow, pink.\nThe function : (a)\nReadData()\n• prompts the user to enter a filename and reads this filename from the user\n• opens the file and reads each line of data into a 1D array\n• returns the populated 1D array.\nThe function needs to work for a file that contains an unknown number of lines.\nWrite program code for\nReadData()\nSave your program as Question2_J25.\nCopy and paste the program code into part in the evidence document. 2(a)\n[7]\nThe procedure takes a 1D string array as a parameter with the identifier (b)\nSplitData()\nDataArray\nThe procedure declares six 1D arrays: one array for each colour that appears in the file (red,\ngreen, blue, orange, yellow, pink).\nThe procedure accesses each string in . The data in each string is split into the\nDataArray\ninteger and the colour. The integer is stored in the array that matches the colour.\nFor example, the first string in has the integer and the colour , so the\nDataArray 10 red\ninteger is stored in the array for the colour red.\n10\nWrite program code for\nSplitData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[6]\n© UCLES 2025 9618/41/M/J/25\n5\nThe procedure : (c)\nStoreData()\n• takes parameters: a 1D array and a filename two\nDataToStore\n• opens the text file with the filename that is passed as a parameter\n• appends each item of data from to a new line in the text file\nDataToStore\n• uses exception handling when opening and writing data to the text file.\nWrite program code for\nStoreData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[5]\nEach of the six colours has a blank text file where the numbers will be stored. The names of (d)\nthese six text files are:\n•\nBlue.txt\n•\nGreen.txt\n•\nOrange.txt\n•\nPink.txt\n•\nRed.txt\n•\nYellow.txt\nThe procedure needs amending to call times, with each of six\nSplitData() StoreData()\nthe colour arrays and the name of the text file that corresponds to that colour. six\nFor example, will be called with the red array and the file name\nStoreData() \"Red.txt\"\nWrite program code to amend\nSplitData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)\n[2]\nThe main program calls and then (e)\nReadData() SplitData()\nWrite program code for the main program. (i)\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(e)(i)\n[3]\nTest your program. Input the text when prompted. (ii)\n\"TheData.txt\"\nTake a screenshot of the output(s) and a screenshot showing the content of the file that\nstores the red nu"
    },
    {
      "id": "9618-2025-mj-41-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_41.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p04.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p05.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p06.png",
        "9618-practical-programming/assets/9618-2025-mj-41-q03-p07.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_41.pdf?download=true",
        "source_pages": [
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          39,
          40,
          41,
          42,
          43
        ],
        "marks": 30
      },
      "text_excerpt": "A program stores data in a binary tree that is designed using Object‑Oriented Programming 3\n(OOP).\nThe tree stores data in ascending numerical order, for example:\n30\n20 45\n1 21 33 63\nThe class stores data about the nodes.\nNode\nNode\nstores the node’s integer data NodeData : Integer\nstores the node that is stored to the left of the current LeftNode : Node\nnode, or a null value if there is no node to the left\nstores the node that is stored to the right of the current RightNode : Node\nnode, or a null value if there is no node to the right\ninitialises to its parameter value; initialises\nConstructor() NodeData\nand to a null value\nLeftNode RightNode\nreturns\nGetLeft() LeftNode\nreturns\nGetRight() RightNode\nreturns\nGetData() NodeData\ntakes an object of type as a parameter and stores\nSetLeft() Node\nit in\nLeftNode\ntakes an object of type as a parameter and stores SetRight() Node\nit in\nRightNode\n© UCLES 2025 9618/41/M/J/25\n7\nWrite program code to declare the class and its constructor. (a) (i)\nNode\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_J25.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[4]\nWrite program code for the get methods. (ii) three\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\nThe method takes an object of type as a parameter. The method (iii)\nSetLeft() Node\nstores the parameter in the attribute\nLeftNode\nThe method takes an object of type as a parameter. The method\nSetRight() Node\nstores the parameter in the attribute\nRightNode\nWrite program code for and\nSetLeft() SetRight()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iii)\n[3]\nWrite the main program to declare objects of type : (b) five\nNode\n• Node 1 with the data\n10\n• Node 2 with the data\n20\n• Node 3 with the data\n5\n• Node 4 with the data\n15\n• Node 5 with the data\n7\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[2]\n[Turn over © UCLES 2025 9618/41/M/J/25\n8\nThe class stores the tree. (c)\nTree\nTree\nstores the root node in the tree FirstNode : Node\ninitialises to its parameter value\nConstructor() FirstNode\nreturns the node stored in\nGetRootNode() FirstNode\nstores its parameter node in the correct position in the\nInsert()\ntree\nWrite program code to declare the class and its constructor. (i)\nTree\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(i)\n[2]\nWrite program code for (ii)\nGetRootNode()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)(ii)\n[1]\nThe method takes a node as a parameter and then searches the tree to find (iii)\nIn"
    },
    {
      "id": "9618-2025-mj-42-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 27,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_42.pdf?download=true",
        "source_pages": [
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18
        ],
        "marks": 27
      },
      "text_excerpt": "A program reads data from a text file and stores it in a stack. The stack is stored as a 1D 1\nStack\narray of up to 20 elements. The pointer stores the index of the last element stored in\nTopOfStack\nthe stack.\nis a global array of strings with all elements initialised to (a)\nStack \"-1\"\nis a global variable initialised to\nTopOfStack –1\nWrite program code to declare and initialise and\nStack TopOfStack\nSave your program as Question1_J25.\nCopy and paste the program code into part in the evidence document. 1(a)\n[2]\nThe function takes a string parameter and attempts to store it on the stack. (b)\nPush()\nThe function returns if the stack is full.\n–1\nThe function returns if the parameter is successfully pushed onto the stack.\n1\nWrite program code for\nPush()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[4]\n© UCLES 2025 9618/42/M/J/25\n3\nThe function returns the next item from the stack. (c)\nPop()\nThe function returns if the stack is empty.\n\"–1\"\nWrite program code for\nPop()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[4]\nThe text file stores numbers and mathematical operators. Each number (d)\nStackData.txt\nand operator are on a new line in the text file.\nThe mathematical operators used in this program are:\nmathematical\nmeaning\noperator\n+ addition\n– subtraction\n/ division\n* multiplication\n^ power of\nThe procedure :\nReadData()\n• takes a string filename as a parameter\n• opens the file and reads in each line of data\n• uses the function to insert each line of data onto the stack\nPush()\n• outputs if any data cannot be stored on the stack because the stack is\n\"Stack full\"\nfull\n• uses exception handling when opening and reading from the text file.\nThe procedure needs to work for a file that contains an unknown number of lines.\nWrite program code for\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)\n[6]\n[Turn over © UCLES 2025 9618/42/M/J/25\n4\nThe values stored in the stack are used to perform mathematical operations. (e)\nA total is initialised to the first value in the stack. The first value in the stack will always be a\nnumber.\nThe next value will be a mathematical operator and the next value will be the number to apply\nto the calculation. This is repeated until there are no values left in the stack. There will always\nbe a number following a mathematical operator.\nFor example, the contents of a stack are:\n10\nTopOfStack\n+\n3\n–\n2\nThe total is initialised to the first value in the stack: 10\ntotal = 10\nThe next two values are: + 3\ntotal = 10 + 3 = 13\nThe next two values are: – 2\ntotal = 13 – 2 = 11\nThe final total is 11 and this is returned.\nWrite program code for the function to:\nCalculate()\n• take each value from the stack\n• calculate and return the final total.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)\n[7]\n© UCLES 2025 9618/42/M/J/25\n5\nWrite program code to extend the main "
    },
    {
      "id": "9618-2025-mj-42-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 22,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_42.pdf?download=true",
      "source_pages": [
        6,
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_42.pdf?download=true",
        "source_pages": [
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32
        ],
        "marks": 22
      },
      "text_excerpt": "A program stores data in a 1D array of records, . The array has space for 200 records. 2\nHashTable\nEach data item is stored in a specific index of the array that is calculated using an algorithm. The\nindex is calculated from the key field using the formula:\nKey MOD 200\nIf two key fields generate the same index, there is a collision. Any records that have a collision\nare stored in a second array, . This array has space for 100 records. When a collision is\nSpare\ndetected, the record is stored in the next free space in .\nSpare\nThe pseudocode record format is: (a)\nTYPE NewRecord\nDECLARE Key : INTEGER\nDECLARE Item1 : INTEGER\nDECLARE Item2 : INTEGER\nENDTYPE\nWrite program code to declare the record type\nNewRecord\nIf your chosen programming language does support record formats, a class can be used not\ninstead.\nSave your program as Question2_J25.\nCopy and paste the program code into part in the evidence document. 2(a)\n[2]\nWrite program code to declare the global arrays and (b) (i)\nHashTable Spare\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(i)\n[1]\nAn empty record has the integer stored in each field. (ii)\n–1\nThe procedure stores an empty record in each element in\nInitialise() HashTable\nand\nSpare\nWrite program code for\nInitialise()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)(ii)\n[2]\n© UCLES 2025 9618/42/M/J/25\n7\nThe hash value is calculated from the key field using the formula: (c)\nKey MOD 200\nThe function takes a key field as a parameter and calculates and returns\nCalculateHash()\nthe hash value for the key field.\nWrite program code for\nCalculateHash()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[2]\nThe procedure : (d)\nInsertIntoHash()\n• takes a record of type as a parameter\nNewRecord\n• uses to calculate the hash value for the key field in the record\nCalculateHash()\n• checks if the hash value index in currently stores an empty record\nHashTable\n○ if the index stores an empty record, store the parameter in this index\n○ if the index does store an empty record, store the parameter in not\nSpare\nYou can assume there will always be enough space in to store any collisions.\nSpare\nWrite program code for\nInsertIntoHash()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)\n[6]\nThe text file stores up to 200 rows of data to be stored into the hash table. (e)\nHashData.txt\nEach row contains three integer numbers separated by commas.\nThe first number is the key field, the second number is item 1 and the third number is item 2.\nFor example:\nThe first row in the text file contains: , ,\n646 12 568\nThe key field is , item 1 is and item 2 is\n646 12 568\nThe procedure :\nCreateHashTable()\n• opens the file\nHashData.txt\n• creates a record for each row of data in the file\n• calls with each record.\nInsertIntoHash()\nWrite program code for\nCreateHashTable()\nSave your program.\nCopy and paste the program cod"
    },
    {
      "id": "9618-2025-mj-42-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 26,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_42.pdf?download=true",
      "source_pages": [
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q03-p03.png",
        "9618-practical-programming/assets/9618-2025-mj-42-q03-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_42.pdf?download=true",
        "source_pages": [
          33,
          34,
          35,
          36,
          37,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45
        ],
        "marks": 26
      },
      "text_excerpt": "A program stores data about animals using Object‑Oriented Programming (OOP). 3\nThe class stores the data about animals.\nAnimal\nAnimal\nstores the name of the animal Name : String\nstores the sound the animal makes Sound : String\nstores the size of the animal as an integer between 1 (smallest) Size : Integer\nand 10 (largest)\nstores the intelligence of the animal as an integer between 1 (least) Intelligence : Integer\nand 10 (most)\ninitialises all attributes to its parameter values Constructor()\nreturns a string message that contains the data from the attributes Description()\nWrite program code to declare the class and its constructor. (a) (i)\nAnimal\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_J25.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[4]\nThe method creates and returns a string of the animal’s data in the (ii)\nDescription()\nformat:\n\"The animal's name is \" <Name> \", it makes a \" <Sound> \", its size\nis \" <Size> \" and its intelligence level is \" <Intelligence>\nFor example:\nThe animal's name is Teddy, it makes a Bark, its size is 4 and its\nintelligence level is 6\nWrite program code for\nDescription()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\n[Turn over © UCLES 2025 9618/42/M/J/25\n10\nThe class inherits from the class (b)\nParrot Animal\ninherits the attributes from and overrides the method. The\nParrot Animal Description()\nadditional attributes and methods in the class are:\nParrot\nParrot\nthe width of the parrot’s wings to the nearest cm WingSpan : Integer\nthe number of words the parrot can speak NumberWords : Integer\ncalls the parent constructor using its parameter values; Constructor()\ninitialises and to its parameter values\nWingSpan NumberWords\ntakes an integer parameter and adds this to the number currently ChangeNumberWords()\nin\nNumberWords\nWrite program code to declare the class , its constructor and the method (i)\nParrot\nChangeNumberWords()\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(i)\n[4]\nThe method in the class creates and returns a string of the (ii)\nDescription() Parrot\nanimal’s data in the format:\n\"The animal's name is \" <Name> \", it makes a \" <Sound> \", its size\nis \" <Size> \" and its intelligence level is \" <Intelligence> \". It\nhas a wingspan of \" <WingSpan> \"cm and can say \" <NumberWords> \"\nwords.\"\nFor example:\nThe animal's name is Chewie, it makes a Squawk, its size is 1 and\nits intelligence level is 10. It has a wingspan of 30cm and can\nsay 29 words.\nWrite program code for\nDescription()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(ii)\n[2]\n© UCLES 2025 9618/42/M/J/25\n11\nThe cla"
    },
    {
      "id": "9618-2025-mj-43-q01",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 26,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_43.pdf?download=true",
        "source_pages": [
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18
        ],
        "marks": 26
      },
      "text_excerpt": "A program reads data from a text file and stores it in a queue. The linear queue is stored as 1\nQueue\na 1D array of up to 50 elements. The queue has the following pointers:\n• – this stores the index of the first element in the queue, initialised to\nHeadPointer –1\n• – this stores the index of the last element in the queue, initialised to\nTailPointer –1\nis a global array of 50 integers with all elements initialised to in the main program. (a)\nQueue –1\nThe pointers are declared as global variables and initialised to two\n–1\nWrite program code to declare and initialise , and\nQueue HeadPointer TailPointer\nSave your program as Question1_J25.\nCopy and paste the program code into part in the evidence document. 1(a)\n[3]\nThe function : (b)\nEnqueue()\n• takes an integer parameter to store in the next position in the queue\n• returns if the queue is full and the parameter cannot be stored in the queue\nFALSE\n• returns if the parameter is stored in the queue\nTRUE\n• updates the pointers where appropriate.\nWrite program code for\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[6]\n© UCLES 2025 9618/43/M/J/25\n3\nThe function : (c)\nDequeue()\n• returns the next item in the queue, if the queue is empty not\n• returns if the queue is empty\n–1\n• updates the pointers where appropriate.\nWrite program code for\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[5]\nThe text file stores positive integers. Each integer is on a new line in the (d)\nQueueData.txt\nfile.\nThe procedure :\nCreateQueue()\n• opens the file\nQueueData.txt\n• reads in each line from the text file and uses to insert each line into the\nEnqueue()\nqueue\n• outputs if any item cannot be inserted into the queue\n\"Queue full\"\n• uses exception handling when opening and reading from the text file.\nThe procedure needs to work for a file that contains an unknown number of lines.\nWrite program code for\nCreateQueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)\n[6]\nThe main program needs extending to call . The main program then (e) (i)\nCreateQueue()\nadds together all of the integers stored in the queue, using to access each\nDequeue()\ninteger. The total is then output.\nWrite program code to extend the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)(i)\n[5]\nTest your program. (ii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 1(e)(ii)\n[1]\n[Turn over © UCLES 2025 9618/43/M/J/25"
    },
    {
      "id": "9618-2025-mj-43-q02",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_43.pdf?download=true",
      "source_pages": [
        4,
        5,
        6
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_43.pdf?download=true",
        "source_pages": [
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31,
          32
        ],
        "marks": 20
      },
      "text_excerpt": "A program sorts the data in the 1D array and searches for specific 2\nDataArray DataArray\nvalues.\nstores 14 integer values and is declared local to the main program.\nDataArray\nWrite program code to create and initialise it with the following data values in the (a)\nDataArray\norder they are written:\n0 3 4 56 67 44 43 32 31 345 45 6 54 1\nSave your program as Question2_J25.\nCopy and paste the program code into part in the evidence document. 2(a)\n[1]\nThe function takes an array of integers as a parameter. The function (b)\nInsertionSort()\nsorts the data in the array into ascending numerical order using an insertion sort. The function\nreturns the sorted array.\nWrite program code for\nInsertionSort()\nYou must use any inbuilt sorting functions for your programming language. not\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[5]\nThe procedure takes an array of integers as a parameter. The procedure (c)\nOutputArray()\noutputs each element in the array from the first element to the last element. The output is on\none line with a space between each number.\nAn example output is:\n\"0 3 4 56 67 44 43 32 31 345 45 6 54 1\"\nWrite program code for\nOutputArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[2]\n© UCLES 2025 9618/43/M/J/25\n5\nThe main program needs extending to: (d) (i)\n• output the content of the unsorted array using\nOutputArray()\n• sort the array using\nInsertionSort()\n• output the content of the sorted array using\nOutputArray()\nWrite program code to extend the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)(i)\n[2]\nTest your program. (ii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot into part in the evidence document. 2(d)(ii)\n[1]\nThe function performs a binary search to find in (e)\nSearch() ItemToFind DataArray\nThe function takes parameters: two\n• , an array of integers\nDataArray\n• , an integer to find in\nItemToFind DataArray\nThe function returns:\n• the index of if it is in\nItemToFind DataArray\n• if is in not\n–1 ItemToFind DataArray\nWrite program code for\nSearch()\nYou must use any inbuilt searching functions for your programming language. not\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(e)\n[6]\n[Turn over © UCLES 2025 9618/43/M/J/25\n6\nThe main program needs extending to call with the sorted array times: (f) (i) four\nSearch()\n• the first time to find the index of the integer 0\n• the second time to find the index of the integer 345\n• the third time to find the index of the integer 67\n• the fourth time to find the index of the integer 2\nIf the integer is found in the array, output an appropriate message that includes the index.\nIf the integer is found, output that it was found. not not\nWrite program code to extend the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(f)(i)\n[2]\nT"
    },
    {
      "id": "9618-2025-mj-43-q03",
      "subject": "9618",
      "year": 2025,
      "session": "May/June",
      "session_code": "mj",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 29,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_qp_43.pdf?download=true",
      "source_pages": [
        7,
        8,
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-may-june/qp/9618_s25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p05.png",
        "9618-practical-programming/assets/9618-2025-mj-43-q03-p06.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-mj-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-may-june/ms/9618_s25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-May-June/9618_s25_ms_43.pdf?download=true",
        "source_pages": [
          33,
          34,
          35,
          36,
          37,
          38,
          39,
          40,
          41,
          42,
          43,
          44,
          45
        ],
        "marks": 29
      },
      "text_excerpt": "A program stores data in a linked list that is designed using Object‑Oriented Programming (OOP). 3\nThe class stores data about the nodes.\nNode\nNode\nstores the integer data TheData : Integer\nstores the next node in the linked list NextNode : Node\ninitialises to its parameter value, initialises Constructor() TheData NextNode\nto a null value\nreturns GetData() TheData\nreturns GetNextNode() NextNode\ntakes an object of type as a parameter and stores it in SetNextNode() Node\nNextNode\nWrite program code to declare the class and its constructor. (a) (i)\nNode\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question3_J25.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[4]\nWrite program code for the get methods. (ii) two\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\nThe method takes an object of type as a parameter. The method (iii)\nSetNextNode() Node\nstores the parameter in the attribute\nNextNode\nWrite program code for\nSetNextNode()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(iii)\n[2]\n[Turn over © UCLES 2025 9618/43/M/J/25\n8\nThe class stores the linked list. (b)\nLinkedList\nLinkedList\nstores the first node in the linked list HeadNode : Node\ninitialises to a null value Constructor() HeadNode\ncreates a new node using its integer parameter. Sets this InsertNode()\nnode as the new head node and updates\nNextNode\nfinds the first node that contains its integer parameter and RemoveNode()\nremoves this node from the linked list\nconcatenates and returns the integer data in each node in Traverse()\nthe linked list\nWrite program code to declare the class and its constructor. (i)\nLinkedList\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(i)\n[2]\nThe method : (ii)\nInsertNode()\n• takes an integer as a parameter\n• creates a new node with the parameter as the integer data\n• uses the new node’s method to store the current as\nSetNextNode() HeadNode\nthe next node\n• replaces with the current node.\nHeadNode\nWrite program code for\nInsertNode()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(ii)\n[4]\n© UCLES 2025 9618/43/M/J/25\n9\nThe method concatenates the integer data from the nodes in the linked (iii)\nTraverse()\nlist, starting with the node stored in . The method returns the final string with\nHeadNode\neach integer data separated with a space.\nWrite program code for\nTraverse()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(iii)\n[3]\nThe method takes an integer parameter to search for and remove from (iv)\nRemoveNode()\nthe linked"
    },
    {
      "id": "9618-2025-on-31-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-31-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 The composite record data type, ClubMember, is defined in pseudocode as:\nSIHT\nNI TYPE ClubMember\nETIRW\nDECLARE Code : INTEGER\nDECLARE LastName : STRING\nTON DECLARE FirstName : STRING\nDECLARE Telephone : STRING\nOD\nDECLARE JoinDate : DATE\nDECLARE Fees : REAL\nDECLARE FeesPaid : BOOLEAN\nENDTYPE\nNIGRAM\n(a) (i) Write the pseudocode statement to set up a variable for one record of the composite\ndata type, ClubMember. SIHT\nNI\n...........................................................................................................................................\nETIRW\n..................................................................................................................................... [1]\nTON\nOD (ii) Write the pseudocode statements to assign the following values to the variable set up in\npart (a)(i):\n• 984632 to Code\n• NIGRAM TRUE to FeesPaid\n...........................................................................................................................................\nSIHT\n........................................................................................................................................... NI\nETIRW\n...........................................................................................................................................\nTON\n..................................................................................................................................... [2]\nOD\n(b) An enumerated data type, Activity, is required, so that a new field, Choice, can be added\nto the composite data type, ClubMember, to allow members to choose an activity.\nNIGRAM\n(i) Write the pseudocode statement for the type declaration of Activity to hold the\nnames of the available activities:\nSIHT\nBadminton, Football, Golf, Snooker, Swimming, Tennis.\nNI\nETIRW\n...........................................................................................................................................\nTON\n...........................................................................................................................................\nOD\n...........................................................................................................................................\n..................................................................................................................................... [2]\nNIGRAM\n(ii) Write the new pseudocode statement required to update the declaration of Choice in\nthe definition of ClubMember.\nSIHT\n...........................................................................................................................................\nNI\nETIRW\n..................................................................................................................................... [1]\nTON\n(cid:300)(cid:213)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:2"
    },
    {
      "id": "9618-2025-on-31-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-on-31-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          6,
          7
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer system using binary floating‑point representation with:\nSIHT\n• NI 12 bits for the mantissa\nETIRW • 4 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Write the normalised floating‑point representation of the following positive binary number\nOD\nusing this system.\n0.00000001110101101\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nMantissa Exponent\nNIGRAM\n[2]\nSIHT\n(b) Calculate the normalised binary floating‑point representation of – 76.1875 in this system.\nShow your working. NI\nETIRW\nMantissa Exponent\nTON\nOD\nW orking .....................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON ...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[4]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:180)(cid:251)(cid:213)(cid:285)(cid:278)(cid:272)(cid:235)(cid:244)(cid:253)(cid:204)(cid:215)(cid:180)(cid:221)(cid:177)(cid:242)(cid:258) OD\n(cid:293)(cid:213)(cid:261)(cid:213)(cid:245)(cid:213)(cid:197)(cid:181)(cid:229)(cid:245)(cid:293)(cid:261)(cid:197)(cid:181)(cid:197)(cid:181)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2025-on-31-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 10,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-on-31-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          7,
          8
        ],
        "marks": 10
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n3 (a) Explain why protocols are essential for communication between computer systems.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [2]\n(b) POP3 is an email communication protocol.\nNIGRAM\nIdentify and describe two other communication protocols that are used when sending or\nreceiving emails. SIHT\nNI\nProtocol 1 ..................................................................................................................................\nETIRW\nDescription ................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM Protocol 2 ..................................................................................................................................\nDescription ................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\n[4] TON\nOD\n(c) Describe two ways in which packet switching ensures a complete message is received when\npassing messages across a network.\n1 ................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n2 ............................................................................"
    },
    {
      "id": "9618-2025-on-31-q04",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 4,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-31-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q04",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          8,
          9
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n4 (a) A scheduling routine determines how processes are managed by the operating system.\nSIHT\nNI Identify two scheduling routines.\nETIRW\n1 ................................................................................................................................................\nTON\n2 ................................................................................................................................................\nOD\n[2]\n(b) Describe two ways in which the complexities of the computer hardware are hidden from the\nuser.\nNIGRAM\n1 ................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n2 ................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\n[4] NI\nETIRW"
    },
    {
      "id": "9618-2025-on-31-q05",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 5,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-on-31-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q05",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 5
      },
      "text_excerpt": "ETIRW\n5 (a) Identify two items commonly found within a digital certificate.\nTON\n1 ................................................................................................................................................\nOD\n...................................................................................................................................................\n2 ................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[2]\nSIHT\nNI (b) Explain why a digital certificate is required to validate a digital signature.\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:184)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:179)(cid:249)(cid:205)(cid:289)(cid:300)(cid:297)(cid:233)(cid:268)(cid:251)(cid:262)(cid:225)(cid:296)(cid:219)(cid:225)(cid:250)(cid:258) OD\n(cid:293)(cid:293)(cid:229)(cid:277)(cid:245)(cid:181)(cid:229)(cid:245)(cid:213)(cid:229)(cid:197)(cid:261)(cid:261)(cid:213)(cid:261)(cid:245)(cid:293)(cid:213)"
    },
    {
      "id": "9618-2025-on-31-q06",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-31-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-31-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n6 (a) The diagram shows a logic circuit.\nSIHT\nNI\nETIRW\nP\nA\nR\nTON\nOD\nNIGRAM\nB Z\nSIHT\nNI\nETIRW\nS\nTON\nQ\nC\nOD\nComplete the truth table for the given logic circuit.\nNIGRAM\nShow your working.\nSIHT\nWorking space\nNI\nA B C P Q R S Z\nETIRW\n0 0 0\nTON\n0 0 1\nOD\n0 1 0\n0 1 1\n1 0 0\nNIGRAM\n1 0 1\nSIHT 1 1 0\n1 1 1 NI\nETIRW\n[3]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:181)(cid:254)(cid:215)\n© UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:180)(cid:249)(cid:210)(cid:299)(cid:260)(cid:291)(cid:225)(cid:255)(cid:266)(cid:239)(cid:193)(cid:272)(cid:186)(cid:265)(cid:266)(cid:258) OD\n(cid:293)(cid:181)(cid:261)(cid:277)(cid:245)(cid:277)(cid:229)(cid:213)(cid:277)(cid:197)(cid:293)(cid:261)(cid:197)(cid:213)(cid:229)(cid:181)(cid:181)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) (i) Complete the Karnaugh map (K‑map) for the Boolean expression:\nSIHT\nNI A.B.C + A.B.C + A.B.C + A.B.C\nETIRW\nTON\nBC\nOD\nA 00 01 11 10\n0 NIGRAM\n1 SIHT\nNI [2]\nETIRW\n(ii) Draw loop(s) around appropriate group(s) in the K‑map to produce an optimal\nTON sum‑of‑products.\n[2]\nOD\n(iii) Write the Boolean expression from your answer to part b(ii) as a simplified\nsum‑of‑products. Do not carry out any further simplification.\nNIGRAM\n...................................................................................................................................................\n............................................................................................................................................. [2] SIHT\nNI"
    },
    {
      "id": "9618-2025-on-31-q07",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 7,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2025-on-31-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q07",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          11,
          12
        ],
        "marks": 6
      },
      "text_excerpt": "SIHT\nNI\n7 (a) Identify one Artificial Intelligence (AI) algorithm to find the shortest distance between two\nETIRW\npoints on a graph.\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [1]\n(b) Describe Deep Learning.\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n............................................................................................................................................. [5]\nTON\n(cid:300)(cid:219)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:181)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:179)(cid:250)(cid:218)(cid:285)(cid:256)(cid:275)(cid:216)(cid:249)(cid:247)(cid:186)(cid:277)(cid:296)(cid:286)(cid:265)(cid:250)(cid:258) OD\n(cid:293)(cid:181)(cid:245)(cid:213)(cid:181)(cid:245)(cid:197)(cid:181)(cid:261)(cid:181)(cid:181)(cid:261)(cid:197)(cid:181)(cid:197)(cid:245)(cid:229)(cid:213)"
    },
    {
      "id": "9618-2025-on-31-q08",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-31-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          12,
          13
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n8 (a) Outline the purpose of lexical analysis during the compilation of a program.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [2]\n(b) Write the Reverse Polish Notation (RPN) for the given infix expression:\nNIGRAM\n(2 – 6) * (13 + 7) / 5\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [2]\n(c) The RPN expression:\nNIGRAM\nd a b + * c a ‑ /\nSIHT\nis to be evaluated, where:\nNI\nETIRW a = 6, b = 12, c = 15 and d = 5.\nShow the changing contents of the stack as the RPN expression is evaluated. TON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\n[4]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:181)(cid:256)(cid:215)\n© UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:179)(cid:251)(cid:218)(cid:295)(cid:238)(cid:278)(cid:227)(cid:247)(cid:240)(cid:177)(cid:183)(cid:204)(cid:192)(cid:281)(cid:258)(cid:258) OD\n(cid:293)(cid:261)(cid:229)(cid:213)(cid:245)(cid:245)(cid:197)(cid:277)(cid:293)(cid:277)(cid:197)(cid:261)(cid:261)(cid:181)(cid:293)(cid:245)(cid:181)(cid:213)"
    },
    {
      "id": "9618-2025-on-31-q09",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 9,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        9,
        10
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-31-q09-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-31-q09-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q09",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          13,
          14
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n9 (a) A stack has been implemented using pseudocode to store a maximum of 100 string items\nSIHT\nusing the global variables in the following table:\nNI\nETIRW\nInitialisation\nIdentifier Data type Description\nvalue\nTON\nBase INTEGER 0 pointer for the bottom of the stack\nOD\nTop INTEGER ‑1 pointer for the top of the stack\nStackArray STRING [0:99] 1D array to implement the stack\nMax INTEGER 100 maximum number of items in the stack NIGRAM\nSIHT\nThe value of Top is incremented each time a data item is added to the stack and decremented\nevery time a data item is removed. NI\nETIRW\n(i) Complete the pseudocode for the function to remove a data item from the stack.\nTON\nFUNCTION Pop() ...........................................................................................................\nOD\nDECLARE DataItem : STRING\n\"\" DataItem\nIF .................................................................................................................... THEN\nNIGRAM\n....................................................................................................... DataItem\nSIHT\n.................................................................................................................. Top\nNI ELSE\nETIRW\n\"You cannot remove data; the stack is empty\" DataItem\nENDIF\nTON\n...................................................................................................................................... OD\nENDFUNCTION\n[5]\nNIGRAM\n(ii) Write the pseudocode to output the data item removed from the stack with an appropriate\nmessage.\nSIHT\n...........................................................................................................................................\nNI\nETIRW\n..................................................................................................................................... [1]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:181)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:180)(cid:252)(cid:210)(cid:289)(cid:242)(cid:294)(cid:214)(cid:257)(cid:257)(cid:248)(cid:291)(cid:180)(cid:284)(cid:281)(cid:242)(cid:258) OD\n(cid:293)(cid:261)(cid:213)(cid:277)(cid:181)(cid:277)(cid:229)(cid:245)(cid:245)(cid:293)(cid:277)(cid:261)(cid:261)(cid:213)(cid:261)(cid:181)(cid:229)(cid:213)\nNIGRAM\n10\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n(b) A stack is used to implement recursion.\nSIHT\nNI State the three essential features of recursion.\nETIRW\n1 ................................................................................................................................................\nTON\n......................................................................................................................"
    },
    {
      "id": "9618-2025-on-31-q10",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 10,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        10
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-31-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q10",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 3
      },
      "text_excerpt": "ETIRW\n10 Explain what is meant by exception handling.\nTON\nInclude an example of a possible cause of an exception in your answer.\nOD\nExplanation .......................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW Example ...........................................................................................................................................\n[3]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:178)(cid:251)(cid:211)(cid:293)(cid:246)(cid:260)(cid:221)(cid:240)(cid:247)(cid:283)(cid:219)(cid:202)(cid:236)(cid:225)(cid:250)(cid:258) OD\n(cid:293)(cid:213)(cid:197)(cid:277)(cid:245)(cid:245)(cid:293)(cid:277)(cid:197)(cid:229)(cid:197)(cid:197)(cid:261)(cid:277)(cid:293)(cid:245)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-on-31-q11",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "31",
      "question_number": 11,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_31.pdf?download=true",
      "source_pages": [
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_31.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-31-q11-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-31-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-31-q11",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_31.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_31.pdf?download=true",
        "source_pages": [
          15
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\n11 The table shows assembly language instructions for a processor that has one register , the\nSIHT\nAccumulator (ACC).\nNI\nETIRW\nInstruction\nLabel Opcode Operand Explanation TON\nLDM #n Load the number n to ACC OD\nLoad the contents of the location at the given\nLDD <address>\naddress to the ACC\nThe address to be used is at the given address.\nNIGRAM\nLDI <address> Load the contents of this second address to the\nACC\nSIHT Add the contents of the given address to the\nADD <address>\nACC\nNI\nSubtract the contents of the given address from ETIRW\nSUB <address>\nthe ACC\nTON Store the contents of the ACC at the given\nSTO <address>\naddress\nOD\nGives a symbolic address <label> to the\n<label>: <data>\nmemory location with contents <data>\n# denotes a denary number, e.g. #123\nNIGRAM <label> can be used in place of <address>\n(a) Write assembly language code, using only the given instruction set to:\nSIHT\n• store the denary value 100 as a named constant\nNI\n• subtract the constant from the value contained in address 632\nETIRW\n• store the result in variable Answer.\nTON\nShow the initialisation of the constant and Answer in the table provided.\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n................................................................................................................................................... SIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\nLabel Contents OD\nNIGRAM\n[6]\nSIHT\n(b) The address 632 contains the value 45.\nNI\nETIRW State the value of Answer after the code described in part (a) has executed.\n............................................................................................................................................. [1] TON\n(cid:300)(cid:219)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/31/O/N/25 (cid:300)(cid:261)(cid:177)(cid:252)(cid:219)(cid:291)(cid:250)(cid:244)(cid:220)(cid:266)(cid:266)(cid:206)(cid:255)(cid:178)(cid:240)(cid:225)(cid:266)(cid:258) OD\n(cid:293)(cid:213)(cid:181)(cid:213)(cid:181)(cid:277)(cid:261)(cid:245)(cid:213)(cid:213)(cid:277)(cid:197)(cid:261)(cid:245)(cid:261)(cid:181)(cid:277)(cid:213)\nNIGRAM\n"
    },
    {
      "id": "9618-2025-on-32-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-32-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 The composite data type, Car, is defined in pseudocode as:\nSIHT\nNI TYPE Car\nETIRW\nDECLARE RegNumber : STRING\nDECLARE Make : STRING\nTON DECLARE Model : STRING\nDECLARE BodyStyle : STRING\nOD\nDECLARE Colour : STRING\nDECLARE IntoStock : DATE\nDECLARE Price : REAL\nENDTYPE\nNIGRAM\n(a) (i) Write the pseudocode statement to set up a variable for one record of the composite\ndata type, Car. SIHT\nNI\n...........................................................................................................................................\nETIRW\n..................................................................................................................................... [1]\nTON\nOD (ii) Write the pseudocode statements to assign the following values to the variable set up in\npart (a)(i):\n• \"Blue\" to Colour\n• NIGRAM 21/10/2025 to IntoStock\n...........................................................................................................................................\nSIHT\n........................................................................................................................................... NI\nETIRW\n...........................................................................................................................................\nTON\n..................................................................................................................................... [2]\nOD\n(b) The data type for BodyStyle is changed to an enumerated type, Body.\n(i) Write the pseudocode statement for the type declaration of Body to hold the names of\nNIGRAM\nthe available choices:\nConvertible, Hatchback, Saloon, SUV SIHT\nNI ...........................................................................................................................................\nETIRW\n...........................................................................................................................................\nTON\n........................................................................................................................................... OD\n..................................................................................................................................... [2]\n(ii) Write the new pseudocode statement required to update the declaration of BodyStyle NIGRAM\nin the definition of Car.\nSIHT ...........................................................................................................................................\nNI\n..................................................................................................................................... [1] ETIRW\nTON\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:184)(cid:254)(cid:215)\n© UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:184)(cid:243)(cid:213)(cid:2"
    },
    {
      "id": "9618-2025-on-32-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-on-32-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer system using binary floating-point representation with:\nSIHT\n• NI 10 bits for the mantissa\nETIRW • 6 bits for the exponent\n• two’s complement form for both the mantissa and the exponent.\nTON\n(a) Calculate the denary value of the given normalised binary floating-point number.\nOD\nShow your working.\nMantissa Exponent\nNIGRAM\n0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 1\nSIHT\nNI W orking .....................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\nDenary value ............................................... ..............................................................................\nSIHT [3]\nNI\n(b) Calculate the normalised binary floating-point representation of +26.6875 in this system. ETIRW\nShow your working.\nTON\nMantissa Exponent\nOD\nNIGRAM\nW orking .....................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n................................................................................................................................................... ETIRW\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\n[3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:184)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:183)(cid:244)(cid:205)(cid:295)(cid:291)(cid:251)(cid:236)(cid:249)(cid:253)(cid:244)(cid:276)(cid:217)(cid:178)(cid:209)(cid:242)(cid:258) OD\n(cid:293)(cid:181)(cid:277)(cid:213)(cid:245)(cid:181)(cid:261)(cid:181)(cid:245)(cid:277)(cid:245)(cid:197)(cid:197)(cid:181)(c"
    },
    {
      "id": "9618-2025-on-32-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-on-32-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n3 (a) HTTP and IMAP are examples of protocols used in the Application Layer of the TCP/IP\nSIHT\nprotocol suite.\nNI\nETIRW State the purpose of the HTTP and IMAP protocols.\nTON HTTP ........................................................................................................................................\nOD\n...................................................................................................................................................\nIMAP .........................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n[2]\nSIHT\n(b) Describe how files are shared using the BitTorrent protocol.\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT ...................................................................................................................................................\nNI\n...................................................................................................................................................\nETIRW\n............................................................................................................................................. [4]\nTON"
    },
    {
      "id": "9618-2025-on-32-q04",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-on-32-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 4
      },
      "text_excerpt": "TON\nOD 4 (a) Identify one benefit of circuit switching and one benefit of packet switching.\nCircuit switching ........................................................................................................................\nNIGRAM ...................................................................................................................................................\nPacket switching .......................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\n[2] ETIRW\n(b) Identify two differences between circuit switching and packet switching. TON\nOD\n1 ................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n2 ................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON [2]\n(cid:300)(cid:205)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:184)(cid:256)(cid:215)\n© UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:183)(cid:241)(cid:205)(cid:285)(cid:273)(cid:238)(cid:207)(cid:247)(cid:262)(cid:251)(cid:178)(cid:245)(cid:276)(cid:193)(cid:266)(cid:258) OD\n(cid:293)(cid:261)(cid:197)(cid:213)(cid:181)(cid:181)(cid:261)(cid:277)(cid:277)(cid:181)(cid:261)(cid:197)(cid:261)(cid:181)(cid:229)(cid:277)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-on-32-q05",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-32-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          10
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n5 (a) Describe how interrupt handling is used in low-level scheduling.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [2]\nSIHT\n(b) In process management, a process can be in one of three process states: running, ready or\nNI\nblocked.\nETIRW\nComplete the table to identify one reason why a process could be in each of the three states.\nTON\nOD\nProcess state Reason\n................................................................................................\nNIGRAM\n................................................................................................\nrunning\nSIHT ................................................................................................\nNI\n................................................................................................ ETIRW\n................................................................................................ TON\nOD\n................................................................................................\nready\n................................................................................................\nNIGRAM\n................................................................................................\nSIHT ................................................................................................\nNI\n................................................................................................\nETIRW blocked\n................................................................................................\nTON\nOD ................................................................................................\n[3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:207)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:184)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:184)(cid:242)(cid:213)(cid:299)(cid:269)(cid:254)(cid:234)(cid:257)(cid:251)(cid:174)(cid:294)(cid:253)(cid:200)(cid:193)(cid:250)(cid:258) OD\n(cid:293)(cid:261)(cid"
    },
    {
      "id": "9618-2025-on-32-q06",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        6,
        7
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-32-q06-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-32-q06-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          11,
          12
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n6 (a) The diagram shows a logic circuit.\nSIHT\nNI\nA ETIRW\nQ\nS\nTON\nZ\nOD\nP\nB\nNIGRAM\nSIHT\nNI\nETIRW\nR\nTON\nC\nOD\nComplete the truth table for the given logic circuit.\nShow your working.\nNIGRAM\nWorking space\nSIHT A B C P Q R S Z\nNI\n0 0 0\nETIRW\n0 0 1\nTON\n0 1 0 OD\n0 1 1\n1 0 0\nNIGRAM\n1 0 1\nSIHT\n1 1 0\nNI\nETIRW\n1 1 1\n[3] TON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:251)(cid:181)(cid:254)(cid:215)\n© UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:183)(cid:242)(cid:218)(cid:289)(cid:245)(cid:264)(cid:226)(cid:262)(cid:266)(cid:199)(cid:262)(cid:245)(cid:229)(cid:297)(cid:266)(cid:258) OD\n(cid:293)(cid:213)(cid:277)(cid:277)(cid:245)(cid:245)(cid:293)(cid:213)(cid:197)(cid:229)(cid:245)(cid:197)(cid:197)(cid:213)(cid:293)(cid:277)(cid:197)(cid:213)\nNIGRAM\n7\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n(b) (i) Complete the Karnaugh map (K-map) for the Boolean expression:\nSIHT\nNI A.B.C + A.B.C + A.B.C + A.B.C\nETIRW\nBC TON\nOD\nA 00 01 11 10\n0\nNIGRAM\n1\nSIHT\n[2]\nNI\nETIRW\n(ii) Draw loop(s) around appropriate group(s) in the K-map to produce an optimal\nsum-of-products. [2]\nTON\n(iii) Write the Boolean expression from your answer to part b(ii) as a simplified\nOD\nsum-of-products. Do not carry out any further simplification.\n...........................................................................................................................................\nNIGRAM\n..................................................................................................................................... [2]"
    },
    {
      "id": "9618-2025-on-32-q07",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 7,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-on-32-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q07",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n7 (a) Asymmetric encryption is a type of cryptography. SIHT\nNI\nIdentify one other type of cryptography.\nETIRW\n...................................................................................................................................................\nTON\nOD ............................................................................................................................................. [1]\n(b) An organisation holds two asymmetric encryption keys, which they intend to use to receive\nsecure transmissions.\nNIGRAM\nExplain how the organisation makes use of the two keys to receive a secure transmission.\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n................................................................................................................................................... TON\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ............................................................................................................................................. [4]\nETIRW\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:181)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:184)(cid:241)(cid:210)(cid:295)(cid:249)(cid:248)(cid:215)(cid:244)(cid:247)(cid:258)(cid:210)(cid:253)(cid:241)(cid:297)(cid:250)(cid:258) OD\n(cid:293)(cid:213)(cid:293)(cid:213)(cid:181)(cid:277)(cid:261)(cid:181)(cid:213)(cid:213)(cid:229)(cid:197)(cid:197)(cid:181)(cid:261)(cid:213)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-on-32-q08",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 8,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-32-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q08",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          13,
          14
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n8 (a) State the purpose of the optimisation stage in the compilation of a program.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [1]\n(b) Convert this Reverse Polish Notation (RPN) back to its original infix form:\nNIGRAM\na b - c + c a - * d /\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(c) The RPN expression:\nNI\nETIRW c a / b d – * b +\nis to be evaluated, where: TON\nOD\na = 3, b = 16, c = 9 and d = 6.\nShow the changing contents of the stack as the RPN expression is evaluated.\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:181)(cid:256)(cid:215)\n© UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:184)(cid:244)(cid:210)(cid:285)(cid:267)(cid:241)(cid:228)(cid:238)(cid:240)(cid:265)(cid:244)(cid:225)(cid:211)(cid:249)(cid:258)(cid:258) OD\n(cid:293)(cid:293)(cid:181)(cid:213)(cid:245)(cid:277)(cid:261)(cid:277)(cid:181)(cid:245)(cid:213)(cid:197)(cid:261)(cid:181)(cid:229)(cid:213)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2025-on-32-q09",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 9,
      "topic_number": 18,
      "topic": "Artificial intelligence (AI)",
      "topic_slug": "9618-topic-18-artificial-intelligence",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-18-artificial-intelligence/assets/9618-2025-on-32-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q09",
        "html": "9618-topic-18-artificial-intelligence/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          14,
          15
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n9 (a) Deep Learning is a form of Machine Learning.\nSIHT\nNI (i) State one example where Deep Learning is used.\nETIRW\n...........................................................................................................................................\nTON\n..................................................................................................................................... [1]\nOD\n(ii) Identify how Deep Learning can be made more effective.\n...........................................................................................................................................\nNIGRAM\n..................................................................................................................................... [1]\nSIHT\n(b) Describe the back propagation of errors method in Machine Learning.\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW ...................................................................................................................................................\n............................................................................................................................................. [4] TON\nOD"
    },
    {
      "id": "9618-2025-on-32-q10",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 10,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-32-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q10",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          15
        ],
        "marks": 4
      },
      "text_excerpt": "TON\nOD\n10 An exception is an error that may cause a program to halt unexpectedly.\n(a) Describe how program termination due to an exception can be avoided.\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n............................................................................................................................................. [2] OD\n(b) Identify two possible causes of exceptions.\n1 ................................................................................................................................................ NIGRAM\n...................................................................................................................................................\nSIHT\n2 ................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\n[2]\nTON\n(cid:300)(cid:211)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:181)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:183)(cid:243)(cid:218)(cid:299)(cid:263)(cid:257)(cid:213)(cid:268)(cid:257)(cid:192)(cid:232)(cid:217)(cid:263)(cid:249)(cid:242)(cid:258) OD\n(cid:293)(cid:293)(cid:197)(cid:277)(cid:181)(cid:245)(cid:293)(cid:245)(cid:229)(cid:261)(cid:261)(cid:197)(cid:261)(cid:213)(cid:197)(cid:277)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-on-32-q11",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 11,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-32-q11-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-32-q11-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q11",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          16
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n11 The table shows assembly language instructions for a processor that has one register , the\nSIHT\nAccumulator (ACC).\nNI\nETIRW\nInstruction\nTON Label Opcode Operand Explanation\nOD LDM #n Load the number n to the ACC\nLoad the contents of the location at the given\nLDD <address>\naddress to ACC\nThe address to be used is at the given address.\nNIGRAM\nLDI <address> Load the contents of this second address to\nthe ACC.\nSIHT\nAdd the contents of the given address to the\nADD <address>\nACC\nNI\nETIRW Subtract the contents of the given address\nSUB <address>\nfrom the ACC\nTON\nStore the contents of the ACC at the given\nSTO <address>\naddress\nOD\nGives a symbolic address <label> to the\n<label>: <data>\nmemory location with the contents <data>\n# denotes a denary number, e.g. #123\nNIGRAM <label> can be used in place of <address>\nSIHT The current contents of memory are:\nNI\nETIRW Address Contents\n26 150\nTON\n86 300\nOD\n150 420\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:209)(cid:266)(cid:174)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:183)(cid:254)(cid:215)\n© UCLES 2025 9618/32/O/N/25 (cid:300)(cid:265)(cid:181)(cid:244)(cid:219)(cid:287)(cid:259)(cid:295)(cid:222)(cid:245)(cid:247)(cid:227)(cid:272)(cid:227)(cid:183)(cid:193)(cid:250)(cid:258) OD\n(cid:293)(cid:181)(cid:213)(cid:277)(cid:245)(cid:277)(cid:229)(cid:277)(cid:277)(cid:197)(cid:213)(cid:261)(cid:261)(cid:277)(cid:229)(cid:213)(cid:245)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\nWrite assembly language code, using only the given instruction set to:\nSIHT\n• NI store the contents of location 300 as labelled variable A\nETIRW • store the contents of location 420 as labelled variable B\n• add the value stored in the address contained in variable B to the value contained in\nTON variable A\n• store the result in variable Answer.\nOD\nShow the initialisation and values of the variables A, B and Answer in the table provided.\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n......................................."
    },
    {
      "id": "9618-2025-on-32-q12",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "32",
      "question_number": 12,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_32.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_32.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-32-q12-p01.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-32-q12-p02.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-32-q12-p03.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-32-q12-p04.png",
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-32-q12-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-32-q12",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_32.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_32.pdf?download=true",
        "source_pages": [
          17
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:3)(cid:44)\n12 (a) A stack has been implemented using pseudocode to store a maximum of 100 string items\nSIHT\nusing the global variables in the following table:\nNI\nETIRW\nInitialisation\nIdentifier Data type Description\nvalue\nTON\nBase INTEGER 0 pointer for the bottom of the stack\nOD\nTop INTEGER -1 pointer for the top of the stack\nStackArray STRING [0:99] 1D array to implement the stack\nMax INTEGER 100 maximum number of items in the stack NIGRAM\nThe value of Top is incremented each time a data item is added to the stack and decremented\nSIHT\neach time a data item is removed. If the stack is full, an appropriate error message is output.\nNI\nETIRW (i) Complete the pseudocode for the procedure to add a data item onto the stack.\nPROCEDURE Push(.........................................................................................................) TON\nIF Top < Max – 1 THEN\nOD\nTop ← ...............................................................................................................\n...................................................................................................... ← NewData\nNIGRAM\nELSE\nOUTPUT ...............................................................................................................\nSIHT\nENDIF\nNI ENDPROCEDURE\nETIRW\n[4]\nTON\n(ii) Write pseudocode to input a new data item and add it to the stack using Push().\nOD\n...........................................................................................................................................\n...........................................................................................................................................\nNIGRAM\n...........................................................................................................................................\nSIHT ..................................................................................................................................... [2]\nNI\n(b) Explain the reasons why a stack is used when a recursive algorithm is executed. ETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n........................................................................................................"
    },
    {
      "id": "9618-2025-on-33-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 1,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        2
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-33-q01-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q01",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          6
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:3)(cid:44)\n1 (a) An enumerated data type, Spectrum, is required to hold the names of colours.\nSIHT\nNI (i) Write the pseudocode statement for the type declaration of Spectrum to hold the\nETIRW\nnames of the colours available:\nTON Red, Orange, Yellow, Green, Blue, Indigo, Violet.\nOD\n...........................................................................................................................................\n..................................................................................................................................... [2]\nNIGRAM\n(ii) Identify two characteristics of the list of values given in an enumerated data type\ndeclaration.\nSIHT\n1 .........................................................................................................................................\nNI\nETIRW\n...........................................................................................................................................\nTON\n2 .........................................................................................................................................\nOD\n...........................................................................................................................................\n[2]\nNIGRAM (b) ColourData is a composite data type to store definitions of colours.\nW rite pseudocode statements to declare ColourData to hold the following fields:\nSIHT\nNI Field Example data\nETIRW\nXYZ12345 ColourCode\nTON\nRed Colour\nOD\n650 Wavelength\n4.62 Frequency\nYes PrimaryColour\nNIGRAM\nUse the most appropriate data type in each case, including the enumerated data type\nSpectrum from part a(i). SIHT\nNI\n...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n...................................................................................................................................................\n................................................................................................................................................... NIGRAM\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n............................................................................................................................................. [4]\nTON\n(cid:300)(cid:213)("
    },
    {
      "id": "9618-2025-on-33-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 2,
      "topic_number": 13,
      "topic": "Data representation",
      "topic_slug": "9618-topic-13-data-representation",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-13-data-representation/assets/9618-2025-on-33-q02-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q02",
        "html": "9618-topic-13-data-representation/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:4)(cid:44)\n2 Numbers are stored in a computer system using binary floating‑point representation with:\nSIHT\n• NI 12 bits for the mantissa\nETIRW • 4 bits for the exponent\n• two’s complement form for both the mantissa and the exponent\nTON • 2 bytes in total.\nOD\n(a) Outline the effect of changing the number of bits used to store the mantissa to 10 bits, in this\nsystem.\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\n(b) Describe one example of a situation that could cause an overflow to occur and the\nNIGRAM consequences of such an overflow.\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n............................................................................................................................................. [3]\nNIGRAM"
    },
    {
      "id": "9618-2025-on-33-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 3,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        3
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-on-33-q03-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q03",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          7
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n3 Describe how packet switching is used to pass messages across a network. Do not include\nchecking for completeness and resending packets in your answer.\nSIHT\nNI ..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\n.......................................................................................................................................................... OD\n..........................................................................................................................................................\n.......................................................................................................................................................... NIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n.................................................................................................................................................... [4]\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:183)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:187)(cid:249)(cid:213)(cid:297)(cid:253)(cid:299)(cid:211)(cid:259)(cid:238)(cid:256)(cid:223)(cid:255)(cid:239)(cid:233)(cid:242)(cid:258) OD\n(cid:293)(cid:261)(cid:293)(cid:277)(cid:181)(cid:245)(cid:229)(cid:213)(cid:181)(cid:213)(cid:293)(cid:197)(cid:197)(cid:245)(cid:229)(cid:213)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q04",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 4,
      "topic_number": 14,
      "topic": "Communication and internet technologies",
      "topic_slug": "9618-topic-14-communication-and-internet-technologies",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-14-communication-and-internet-technologies/assets/9618-2025-on-33-q04-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q04",
        "html": "9618-topic-14-communication-and-internet-technologies/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:5)(cid:44)\n4 Identify and describe three protocols that are used in the Application Layer of the TCP/IP protocol\nSIHT\nsuite.\nNI\nETIRW\nProtocol 1 .........................................................................................................................................\nTON Description .......................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\nProtocol 2 .........................................................................................................................................\nDescription ....................................................................................................................................... SIHT\nNI\n..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\nOD Protocol 3 .........................................................................................................................................\nDescription .......................................................................................................................................\nNIGRAM ..........................................................................................................................................................\n..........................................................................................................................................................\nSIHT\n[6]\nNI"
    },
    {
      "id": "9618-2025-on-33-q05",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 5,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        4
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-33-q05-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q05",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          8
        ],
        "marks": 4
      },
      "text_excerpt": "NI\nETIRW 5 (a) State the purpose of multi‑tasking.\n................................................................................................................................................... TON\nOD\n............................................................................................................................................. [1]\n(b) Explain how an operating system ensures that multi‑tasking operates efficiently.\nNIGRAM\n...................................................................................................................................................\n...................................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n................................................................................................................................................... OD\n............................................................................................................................................. [3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:213)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:251)(cid:183)(cid:256)(cid:215)\n© UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:187)(cid:252)(cid:213)(cid:291)(cid:239)(cid:286)(cid:232)(cid:253)(cid:245)(cid:263)(cid:253)(cid:227)(cid:205)(cid:185)(cid:266)(cid:258) OD\n(cid:293)(cid:181)(cid:181)(cid:277)(cid:245)(cid:245)(cid:229)(cid:245)(cid:213)(cid:245)(cid:277)(cid:197)(cid:261)(cid:245)(cid:261)(cid:213)(cid:197)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q06",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 6,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 8,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        5
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-33-q06-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q06",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          9,
          10
        ],
        "marks": 8
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:6)(cid:44)\n6 (a) The Karnaugh map (K‑map) represents a logic circuit with four inputs.\nSIHT\nNI\nAB ETIRW\nCD 00 01 11 10 TON\nOD\n00 0 0 0 0\n01 1 1 1 0\nNIGRAM\n11 0 1 1 1\nSIHT\nNI\n10 0 0 1 1 ETIRW\nTON\n(i) Draw loop(s) around appropriate group(s) in the K‑map to produce an optimal OD\nsum‑of‑products. [3]\n(ii) Write the Boolean expression from your answer to part a(i) as a simplified sum‑of‑products.\nDo not carry out any further simplification. NIGRAM\n...........................................................................................................................................\nSIHT\n..................................................................................................................................... [2]\nNI\nETIRW\n(b) Simplify the following expression using De Morgan’s laws and Boolean algebra.\nTON\nShow all the stages in your simplification.\nOD\nA+B+C+B+C X =\n...................................................................................................................................................\nNIGRAM\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON ...................................................................................................................................................\nOD\n............................................................................................................................................. [3]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:215)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:223)(cid:249)(cid:183)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:188)(cid:251)(cid:205)(cid:293)(cid:243)(cid:270)(cid:209)(cid:251)(cid:268)(cid:194)(cid:217)(cid:219)(cid:265)(cid:185)(cid:250)(cid:258) OD\n(cid:293)(cid:181)(cid:197)(cid:213)(cid:181)(cid:277)(cid:197)(cid:277)(cid:197)(cid:261)(cid:197)(cid:197)(cid:261)(cid:277)(cid:293)(cid:277)(cid:213)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q07",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 7,
      "topic_number": 16,
      "topic": "System software",
      "topic_slug": "9618-topic-16-system-software",
      "marks": 9,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        6
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-16-system-software/assets/9618-2025-on-33-q07-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q07",
        "html": "9618-topic-16-system-software/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          10,
          11
        ],
        "marks": 9
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:7)(cid:44)\n7 (a) Outline the process of optimisation during the compilation of a program.\nSIHT\nNI ...................................................................................................................................................\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n............................................................................................................................................. [2]\n(b) Write the Reverse Polish Notation (RPN) for the given infix expression:\nNIGRAM\n((6 + 12) / (16 – 10)) * 18\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n...................................................................................................................................................\nTON\n...................................................................................................................................................\nOD\n...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM\n............................................................................................................................................. [3]\nSIHT\n(c) The RPN expression\nNI\nETIRW c a – b d + * b c + /\nis to be evaluated, where: TON\nOD\na = 4, b = 12, c = 24 and d = 6.\nShow the changing contents of the stack as the RPN expression is evaluated.\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\n[4]\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:249)(cid:182)(cid:254)(cid:215)\n© UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:187)(cid:251)(cid:210)(cid:287)(cid:283)(cid:280)(cid:217)(cid:240)(cid:249)(cid:187)(cid:185)(cid:227)(cid:300)(cid:273)(cid:266)(cid:258) OD\n(cid:293)(cid:293)(cid:293)(cid:213)(cid:181)(cid:181)(cid:197)(cid:181)(cid:261)(cid:293)(cid:293)(cid:197)(cid:197)(cid:277)(cid:197)(cid:213)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q08",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 8,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        7
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-33-q08-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q08",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 5
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:8)(cid:44)\n8 Calculate the shortest distance between the Start node and each of the nodes in the graph using\nSIHT\nDijkstra’s algorithm.\nNI\nETIRW\nShow your working on the graph or in the working space. Write your answers in the table provided.\nTON\nV\nOD\n4 9\nNIGRAM\nT\nX 3\nSIHT\n5\nNI\nETIRW\nW TON\n3\nOD\n6\n10\nNIGRAM\nY\n22 SIHT\n8\nNI\nETIRW Start\nZ\nTON\nOD\nWorking ............................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\n..........................................................................................................................................................\nSIHT\nNI ..........................................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\nAnswers:\nOD\nT V W X Y Z\nNIGRAM\n[5]\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:222)(cid:251)(cid:182)(cid:254)(cid:215) [Turn over © UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:188)(cid:252)(cid:218)(cid:297)(cid:279)(cid:296)(cid:224)(cid:266)(cid:264)(cid:238)(cid:285)(cid:219)(cid:176)(cid:273)(cid:250)(cid:258) OD\n(cid:293)(cid:293)(cid:277)(cid:277)(cid:245)(cid:213)(cid:229)(cid:213)(cid:277)(cid:277)(cid:181)(cid:197)(cid:197)(cid:245)(cid:229)(cid:277)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q09",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 9,
      "topic_number": 17,
      "topic": "Security",
      "topic_slug": "9618-topic-17-security",
      "marks": 4,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-17-security/assets/9618-2025-on-33-q09-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q09",
        "html": "9618-topic-17-security/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          12
        ],
        "marks": 4
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:44)\n9 A company requires a digital certificate to ensure the authenticity of its online communications.\nSIHT\nOutline the process followed to acquire a digital certificate. NI\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n..........................................................................................................................................................\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\n.......................................................................................................................................................... ETIRW\n..........................................................................................................................................................\nTON\nOD ..........................................................................................................................................................\n.................................................................................................................................................... [4]"
    },
    {
      "id": "9618-2025-on-33-q10",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 10,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 6,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-33-q10-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q10",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 6
      },
      "text_excerpt": "NIGRAM 10 A stack, StackArray, is to be implemented using pseudocode, to store a maximum of 100 string\nitems in an appropriate array. Declarations are required so that the stack has a beginning, an end\nand a maximum size. An array is also required to store the data.\nSIHT\n(a) Write pseudocode to declare the variables, constant and array required to implement the\nNI\nstack. ETIRW\n...................................................................................................................................................\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n............................................................................................................................................. [3]\nNI\nETIRW\n(b) Write pseudocode for a procedure to initialise the top and bottom pointers of the stack to\nappropriate values.\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n...................................................................................................................................................\nNI\nETIRW\n............................................................................................................................................. [3]\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:249)(cid:182)(cid:256)(cid:215)\n© UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:188)(cid:249)(cid:218)(cid:291)(cid:293)(cid:289)(cid:219)(cid:264)(cid:255)(cid:245)(cid:191)(cid:247)(cid:270)(cid:257)(cid:258)(cid:258) OD\n(cid:293)(cid:213)(cid:197)(cid:277)(cid:181)(cid:213)(cid:229)(cid:245)(cid:245)(cid:181)(cid:197)(cid:197)(cid:261)(cid:245)(cid:261)(cid:277)(cid:261)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q11",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 11,
      "topic_number": 19,
      "topic": "Computational thinking and problem-solving",
      "topic_slug": "9618-topic-19-computational-thinking-and-problem-solving",
      "marks": 3,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-19-computational-thinking-and-problem-solving/assets/9618-2025-on-33-q11-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q11",
        "html": "9618-topic-19-computational-thinking-and-problem-solving/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          13
        ],
        "marks": 3
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:10)(cid:44)\n11 Describe when the use of recursion would be beneficial and give an example.\nSIHT\nNI Description .......................................................................................................................................\nETIRW\n..........................................................................................................................................................\nTON\n..........................................................................................................................................................\nOD\n..........................................................................................................................................................\nExample ...........................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT [3]\nNI"
    },
    {
      "id": "9618-2025-on-33-q12",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 12,
      "topic_number": 20,
      "topic": "Further programming",
      "topic_slug": "9618-topic-20-further-programming",
      "marks": 5,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        9
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-20-further-programming/assets/9618-2025-on-33-q12-p01.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q12",
        "html": "9618-topic-20-further-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          14
        ],
        "marks": 5
      },
      "text_excerpt": "SIHT\nNI\n12 An exception can occur when running a program.\nETIRW\n(a) Explain what is meant by an exception.\nTON\nOD ...................................................................................................................................................\n...................................................................................................................................................\nNIGRAM ...................................................................................................................................................\n...................................................................................................................................................\nSIHT\n................................................................................................................................................... NI\nETIRW\n............................................................................................................................................. [3]\nTON\n(b) Identify one example of an exception and give one reason why the ex ception may cause a\nOD\nproblem.\nExample ...................................................... ..............................................................................\nNIGRAM\n...................................................................................................................................................\nReason ......................................................................................................................................\nSIHT\nNI ...................................................................................................................................................\nETIRW\n[2]\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:219)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:224)(cid:251)(cid:182)(cid:256)(cid:215) [Turn over © UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:187)(cid:250)(cid:210)(cid:293)(cid:297)(cid:273)(cid:222)(cid:242)(cid:242)(cid:180)(cid:283)(cid:255)(cid:202)(cid:257)(cid:242)(cid:258) OD\n(cid:293)(cid:213)(cid:181)(cid:213)(cid:245)(cid:181)(cid:197)(cid:277)(cid:293)(cid:197)(cid:277)(cid:197)(cid:261)(cid:277)(cid:293)(cid:213)(cid:277)(cid:213)"
    },
    {
      "id": "9618-2025-on-33-q13",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 3,
      "variant": "33",
      "question_number": 13,
      "topic_number": 15,
      "topic": "Hardware and virtual machines",
      "topic_slug": "9618-topic-15-hardware-and-virtual-machines",
      "marks": 7,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_33.pdf?download=true",
      "source_pages": [
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_33.pdf",
      "image_paths": [
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-33-q13-p01.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-33-q13-p02.png",
        "9618-topic-15-hardware-and-virtual-machines/assets/9618-2025-on-33-q13-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-33-q13",
        "html": "9618-topic-15-hardware-and-virtual-machines/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_33.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_33.pdf?download=true",
        "source_pages": [
          15,
          16
        ],
        "marks": 7
      },
      "text_excerpt": "NIGRAM\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:1)(cid:44)\n13 The table shows assembly language instructions for a processor that has one register , the\nSIHT\nAccumulator (ACC).\nNI\nETIRW\nInstruction\nLabel Opcode Operand Explanation TON\nOD LDM #n Load the number n to the ACC\nLoad the contents of the location at the given\nLDD <address>\naddress to the ACC\nThe address to be used is at the given address.\nNIGRAM\nLDI <address> Load the contents of this second address to\nthe ACC\nSIHT\nAdd the contents of the given address to the\nADD <address>\nACC\nNI\nETIRW\nADD #n Add the number n to the ACC\nSubtract the contents of the given address\nSUB <address> TON\nfrom the ACC\nOD\nSUB #n Subtract the number n from the ACC\nStore the contents of the ACC at the given\nSTO <address>\naddress\nNIGRAM Gives a symbolic address <label> to the\n<label>: <data>\nmemory location with the contents <data>\n# denotes a denary number, e.g. #123\nSIHT\n<label> can be used in place of <address>\nNI\nETIRW\nThe current contents of memory are:\nTON\nOD Address Contents\n125 563\n63 899\nNIGRAM\nSIHT\nNI\nETIRW\nTON\nOD\nNIGRAM\nSIHT\nNI\nETIRW\nTON\n(cid:300)(cid:217)(cid:250)(cid:190)(cid:288)(cid:180)(cid:237)(cid:200)(cid:245)(cid:207)(cid:298)(cid:197)(cid:266)(cid:221)(cid:249)(cid:184)(cid:254)(cid:215)\n© UCLES 2025 9618/33/O/N/25 (cid:300)(cid:265)(cid:185)(cid:249)(cid:211)(cid:289)(cid:285)(cid:247)(cid:213)(cid:255)(cid:264)(cid:207)(cid:227)(cid:245)(cid:250)(cid:185)(cid:250)(cid:258) OD\n(cid:293)(cid:261)(cid:229)(cid:213)(cid:181)(cid:213)(cid:261)(cid:245)(cid:213)(cid:261)(cid:197)(cid:261)(cid:261)(cid:213)(cid:261)(cid:277)(cid:181)(cid:213)\nNIGRAM\n11\n(cid:44)(cid:1)(cid:1)(cid:1)(cid:1)(cid:9)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:1)(cid:2)(cid:2)(cid:44)\nWrite assembly language code, using only the given instruction set to:\nSIHT\n• NI store the denary value 250 as labelled variable X\nETIRW • store the value stored in location 563 as labelled variable Y\n• add the value stored in variable X to the value stored in variable Y\nTON • subtract the value stored in location 899 from the current value in the Accumulator\n• store the result in variable Total.\nOD\nShow the initialisation and values of the variables X, Y and Total in the table provided.\n..........................................................................................................................................................\nNIGRAM\n..........................................................................................................................................................\nSIHT\n..........................................................................................................................................................\nNI\nETIRW\n..........................................................................................................................................................\nTON\n........................................................................"
    },
    {
      "id": "9618-2025-on-41-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_41.pdf?download=true",
      "source_pages": [
        2,
        3
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-41-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-on-41-q01-p02.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-41-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_41.pdf?download=true",
        "source_pages": [
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14
        ],
        "marks": 20
      },
      "text_excerpt": "A program stores integers in a stack. The stack is represented as a 1D array of 30 elements with 1\nthe identifier\nStack\nThe global pointer stores the index of the last element inserted into the stack.\nTopOfStack\nis initialised to\nTopOfStack –1\nWrite program code to declare , initialise each element in the array with a null value (a)\nStack\nand declare and initialise\nTopOfStack\nSave your program as Question1_N25.\nCopy and paste the program code into part in the evidence document. 1(a)\n[2]\nThe function takes an integer parameter. If the stack is full, the function returns (b)\nPush()\n. If the stack is not full, the parameter is inserted into the stack, the pointer is updated\nFALSE\nand the function returns\nTRUE\nWrite the program code for\nPush()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(b)\n[4]\n© UCLES 2025 9618/41/O/N/25\n3\nThe function returns the next integer in the stack and updates the pointer as (c)\nPop()\nappropriate. If there is no data in the stack, the function returns the value\n–999\nWrite program code for\nPop()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(c)\n[4]\nThe main program generates 40 random integers between 0 and 1000 (inclusive) and attempts (d)\nto insert each one into the stack using the appropriate function. If the return value from the\nfunction call indicates the stack is full, no more integers are generated and is\n\"Stack full\"\noutput.\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(d)\n[4]\nThe procedure : (e)\nFindValues()\n• pops each integer from the stack until the stack is empty\n• finds and outputs the largest number that was in the stack in an appropriate message\n• finds and outputs the smallest number that was in the stack in an appropriate message.\nWrite program code for\nFindValues()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(e)\n[4]\nExtend the main program to call (f) (i)\nFindValues()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(f)(i)\n[1]\nTest your program. (ii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 1(f)(ii)\n[1]\n[Turn over © UCLES 2025 9618/41/O/N/25"
    },
    {
      "id": "9618-2025-on-41-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 30,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_41.pdf?download=true",
      "source_pages": [
        4,
        5,
        6,
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-41-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-on-41-q02-p02.png",
        "9618-practical-programming/assets/9618-2025-on-41-q02-p03.png",
        "9618-practical-programming/assets/9618-2025-on-41-q02-p04.png",
        "9618-practical-programming/assets/9618-2025-on-41-q02-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-41-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_41.pdf?download=true",
        "source_pages": [
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ],
        "marks": 30
      },
      "text_excerpt": "A program stores data about trains and train stations using Object-Oriented Programming (OOP). 2\nThe class stores the data about the trains:\nTrain\nTrain\nstores the train ID number\nTrainIDNumber : String\nstores the route number the train is travelling\nRoute : Integer\ninitialises and to the parameter\nTrainIDNumber Route Constructor()\nvalues\nreturns the train ID number\nGetTrainIDNumber()\nreturns the route number the train is travelling\nGetRoute()\nWrite program code to declare the class and its constructor. (a) (i)\nTrain\nDo declare the other methods. not\nAll attributes should be private.\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question2_N25.\nCopy and paste the program code into part in the evidence document. 2(a)(i)\n[4]\nThe methods and return the appropriate attribute. (ii)\nGetTrainIDNumber() GetRoute()\nWrite program code for and\nGetTrainIDNumber() GetRoute()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(a)(ii)\n[3]\n© UCLES 2025 9618/41/O/N/25\n5\nThe program is tested with four trains: (b)\ntrain ID number route\n12ADV 134\n33ART 20\n9FKF 3\n21VBC 24\nWrite program code to declare an instance of for each of the trains. four\nTrain\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[2]\n[Turn over © UCLES 2025 9618/41/O/N/25\n6\nThe class stores the data about the stations: (c)\nStation\nStation\nstores the station ID\nStationID : String\nstores the number of platforms at the station\nNumberPlatforms : Integer\nstores the trains currently at the station platforms\nTrains[0:9] : Train\nstores the number of trains currently at the station\nNumberTrains : Integer\nplatforms\ninitialises and\nStationID NumberPlatforms Constructor()\nto the parameter values, initialises to an\nTrains\nempty array and to\nNumberTrains 0\nreturns a string containing data about the trains\nGetTrains()\ncurrently at the station platforms\ntakes a parameter and stores it if there is a\nTrain AddTrain()\nplatform available; each platform can only have one\ntrain\nWrite program code to declare the class and its constructor. (i)\nStation\nDo declare the other methods. not\nAll attributes should be private.\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)(i)\n[3]\n© UCLES 2025 9618/41/O/N/25\n7\nThe method takes a parameter. The method compares the (ii)\nAddTrain() Train\nattributes and to identify if there is a platform\nNumberTrains NumberPlatforms\navailable (a platform currently with no train).\nThe method returns if there are no platforms available.\nFALSE\nIf there is a platform available, the method:\n• stores the parameter in the array\nTrain Trains\n• updates the appropriate attribute(s)\n• returns\nTRUE\nWrite program code for\nAddTrain()\nSave your program.\nCopy a"
    },
    {
      "id": "9618-2025-on-41-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "41",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 25,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_41.pdf?download=true",
      "source_pages": [
        9,
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_41.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-41-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-on-41-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-on-41-q03-p03.png",
        "9618-practical-programming/assets/9618-2025-on-41-q03-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-41-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_41.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_41.pdf?download=true",
        "source_pages": [
          26,
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36
        ],
        "marks": 25
      },
      "text_excerpt": "A program stores records in the 2D array . Each record is stored at a specific index of 3\nHashTable\nthe array that is calculated using a hashing algorithm with the record’s key field.\n× The array has 100 10 elements. The hashing algorithm uses the key to generate an index\nbetween 0 and 99 (inclusive). If two key fields generate the same index, there is a collision. Any\nrecords that have a collision are stored in the next space in the same index.\nFor example: In this table two record keys generated the same hash value of 1. Four record keys\ngenerated the same hash value of 3.\nIndex 0 1 2 3 4 5 … 9\nrecord 0\nrecord record 1\n2\nrecord record record record 3\n4\n…\n99\nThe program uses Object-Oriented Programming (OOP).\nThe class stores data about the records: (a)\nRecord\nRecord\nstores the integer key field for the data\nKey : Integer\nstores the string data\nData : String\ninitialises and to its parameter values\nKey Data Constructor()\nThe attributes and are public.\nKey Data\nWrite program code to declare the class and its constructor.\nRecord\nUse your programming language appropriate constructor.\nSave your program as Question3_N25.\nCopy and paste the program code into part in the evidence document. 3(a)\n[2]\n[Turn over © UCLES 2025 9618/41/O/N/25\n10\nThe procedure initialises each element in the array to an empty (b)\nInitialiseHashTable()\nor null record.\nWrite program code to declare the global 2D array and the procedure\nHashTable\nInitialiseHashTable()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[2]\nThe function : (c)\nHash()\n• takes an integer key field as a parameter\n• calculates and returns the hash value of the key field.\nThe hash value is the result from the formula:\nkey MOD 100\nWrite program code for\nHash()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)\n[2]\nThe procedure : (d)\nInsertData()\n• takes an object of type as a parameter\nRecord\n• calculates the hash value for the parameter using the appropriate function\n• stores the parameter in the correct position in\nHashTable\nYou can assume there will be no more than 10 objects that generate the same hash value.\nWrite program code for\nInsertData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(d)\n[4]\n© UCLES 2025 9618/41/O/N/25\n11\nThe file stores 200 key values and string data items in the format: (e)\n\"HashTableData.txt\"\nkey,string\nFor example, the first row in the text file is:\n528,permission\nThe key is and the string data is\n528 \"permission\"\nThe procedure :\nReadData()\n• opens the text file and reads each line\n• splits each line into the key and data\n• calls with an object containing each key and matching data.\nInsertData()\nWrite program code for\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(e)\n[5]\nThe function : (f)\nGetRecord()\n• takes an integer key field as a parameter\n• calculates the hash value for the key field using the "
    },
    {
      "id": "9618-2025-on-42-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 28,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_42.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-42-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-on-42-q01-p02.png",
        "9618-practical-programming/assets/9618-2025-on-42-q01-p03.png",
        "9618-practical-programming/assets/9618-2025-on-42-q01-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-42-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_42.pdf?download=true",
        "source_pages": [
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17
        ],
        "marks": 28
      },
      "text_excerpt": "A program stores data about birds using Object-Oriented Programming (OOP). 1\nThe class stores the data about the birds:\nBird\nBird\nstores the number of kilometres per hour (km/h) the bird DistancePerHour : Real\ncan fly (between 0.0 and 100.0 inclusive)\nstores the species of the bird, for example Pigeon Species : String\nstores the current horizontal position of the bird XPosition : Real\nstores the current vertical position of the bird YPosition : Real\ninitialises and to the Constructor() Species DistancePerHour\nparameter values; initialises and\nXPosition YPosition\nto 500.0\nreturns a string message that contains the horizontal and GetPosition()\nvertical position of the bird\nreturns the species of the bird GetSpecies()\ntakes a direction and number of minutes flying (between Move()\n0 and 500 inclusive) as parameters and updates the\nappropriate horizontal or vertical position\n© UCLES 2025 9618/42/O/N/25\n3\nWrite program code to declare the class and its constructor. (a) (i)\nBird\nDo declare the other methods. not\nAll attributes should be private.\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question1_N25.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[4]\nThe method returns the species of the bird. (ii)\nGetSpecies()\nWrite program code for\nGetSpecies()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[2]\nThe method returns a string of the bird’s data in the format: (iii)\nGetPosition()\n\"X = \" & <XPosition> & \" Y = \" & <YPosition>\nAn example string for a bird is:\nX = 500.0 Y = 250.0\nWrite program code for\nGetPosition()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(iii)\n[3]\n[Turn over © UCLES 2025 9618/42/O/N/25\n4\nIf the bird is travelling north, the vertical position increases. If the bird is travelling south, (iv)\nthe vertical position decreases.\nIf the bird is travelling east, the horizontal position increases. If the bird is travelling west,\nthe horizontal position decreases.\nThe method :\nMove()\n• takes the direction of travel as a parameter in the form for north, for south,\n‘N’ ‘S’\nfor east or for west\n‘E’ ‘W’\n• takes the number of minutes that the bird has been flying (to the nearest minute) as\na parameter\n• calculates the distance travelled by the bird using the formula:\ndistance travelled = (distance per hour / 60) * minutes flying\n• updates the vertical or horizontal position using the distance calculated.\nYou do need to validate the parameters. not\nWrite program code for\nMove()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(iv)\n[5]\nThe main program creates two instances of (b)\nBird\nThe first bird is the species ‘Cockatiel’ and flies 71.0 km/h.\nThe second bird is the species ‘Macaw’ and flies 56.0 km/h.\nWrite program code to declare and initialise the birds. two\nSave your program"
    },
    {
      "id": "9618-2025-on-42-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 26,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_42.pdf?download=true",
      "source_pages": [
        6,
        7,
        8,
        9
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-42-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-on-42-q02-p02.png",
        "9618-practical-programming/assets/9618-2025-on-42-q02-p03.png",
        "9618-practical-programming/assets/9618-2025-on-42-q02-p04.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-42-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_42.pdf?download=true",
        "source_pages": [
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26
        ],
        "marks": 26
      },
      "text_excerpt": "A program stores 20 unique random integers between 0 and 100 (inclusive) in a 1D array that is 2\nlocal to the main program.\nWrite program code to declare the array local to the main program and store 20 (a) unique\nrandom numbers between 0 and 100 (inclusive) in the array.\nSave your program as Question2_N25.\nCopy and paste the program code into part in the evidence document. 2(a)\n[3]\nThe procedure takes an integer array as a parameter. The procedure outputs (b)\nPrintArray()\nthe array contents on a single line with a space between each integer.\nWrite the program code for\nPrintArray()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[3]\nThe function : (c)\nBubbleSort()\n• takes an integer array as a parameter\n• sorts the data into ascending order using a bubble sort\n• returns the sorted array.\nThe function needs to work for an array of any length.\nDo use an inbuilt sorting method. not\nWrite program code for\nBubbleSort()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[5]\n© UCLES 2025 9618/42/O/N/25\n7\nThe main program: (d) (i)\n• outputs the contents of the array using\nPrintArray()\n• sorts the array using\nBubbleSort()\n• outputs\n\"Sorted\"\n• outputs the contents of the sorted array using\nPrintArray()\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)(i)\n[3]\nTest your program. (ii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 2(d)(ii)\n[1]\nThe recursive function takes four parameters: (e)\nRecursiveBinarySearch()\n• an integer array\n• the lower bound of the array\n• the upper bound of the array\n• the value to find in the array.\nThe recursive function performs a binary search to find the index of the value in the array.\nThe function returns the index of the value if it is found. The function returns if the value is\n–1\nnot found.\nWrite program code for\nRecursiveBinarySearch()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(e)\n[6]\n[Turn over © UCLES 2025 9618/42/O/N/25\n8\nThe main program: (f) (i)\n• prompts the user to enter an integer\n• takes the integer as input\n• calls with the sorted array, appropriate lower bound,\nRecursiveBinarySearch()\nappropriate upper bound and the user’s input as parameters\n• outputs if the input is not within the array\n\"Not found\"\n• outputs and the index if the input is within the array.\n\"Found at position\"\nWrite program code to amend the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(f)(i)\n[3]\nTest your program times with each of the inputs described: (ii) three\nTest 1: the smallest number in the array\nTest 2: the largest number in the array\nTest 3: a number in the array not\nTake a screenshot of each output.\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 2(f"
    },
    {
      "id": "9618-2025-on-42-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "42",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 21,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_42.pdf?download=true",
      "source_pages": [
        10,
        11,
        12
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_42.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-42-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-on-42-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-on-42-q03-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-42-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_42.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_42.pdf?download=true",
        "source_pages": [
          27,
          28,
          29,
          30,
          31,
          32,
          33,
          34,
          35,
          36,
          37,
          38
        ],
        "marks": 21
      },
      "text_excerpt": "A program stores integers in ascending order in an ordered binary tree. The tree is implemented 3\nas a 2D array.\nEach node is stored with three values:\n• a pointer to the left node\n• the data\n• a pointer to the right node.\nAll null values are stored as\n–1\nThe binary tree can store up to 50 nodes.\nNodes cannot be deleted from the binary tree.\nThe binary tree is stored as a global array with the identifier . The left pointer, the (a)\nTreeArray\ndata and the right pointer of each node are initialised to\n–1\nThe global variable stores the index of the root node in the tree, initialised to\nRootPointer\n–1\nThe global variable stores the index of the next free node in the array, initialised\nFreeNode\nto\n0\nWrite program code to declare and initialise , and\nTreeArray RootPointer FreeNode\nSave your program as Question3_N25.\nCopy and paste the program code into part in the evidence document. 3(a)\n[3]\nThe procedure : (b)\nAddNode()\n• takes an integer to store in the binary tree as a parameter\n• stores the parameter in the next free node in the array\n• finds the position to store the data in the tree by following the appropriate pointers\n• updates the pointer of the new node’s parent node.\nThe procedure outputs if the parameter cannot be stored because\n\"The tree is full\"\nthe tree is full.\nWrite program code for\nAddNode()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)\n[7]\n© UCLES 2025 9618/42/O/N/25\n11\nThe text file stores 50 integers. Each integer is on a new line in the file. (c)\nTreeData.txt\nThe main program reads each integer from the file and stores each integer in the binary tree\nin the order they are read.\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(c)\n[4]\nThe procedure stores the content of in a new text file with (d)\nWriteAllToFile() TreeArray\nthe filename . The file is not provided.\nTree.txt Tree.txt\nEach node in is stored on one line with a comma separating each value.\nTreeArray\nFor example, the current contents of are:\nTreeArray\nIndex 0 1 2\n–1 20 1 0\n–1 30 –1 1\n…\n-1 -1 -1 49\nAfter writing to the text file, will contain:\nTreeArray Tree.txt\n–1,20,1\n–1,30,–1\n…\n-1,-1,-1\nWrite program code for\nWriteAllToFile()\nInclude exception handling when writing to the file.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(d)\n[5]\n[Turn over © UCLES 2025 9618/42/O/N/25\n12\nAmend the main program to call (e) (i)\nWriteAllToFile()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(e)(i)\n[1]\nTest your program. (ii)\nTake a screenshot that shows all of the content stored in the file\nTree.txt\nIn this screenshot you need to make sure the filename is visible.\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 3(e)(ii)\n[1]\nPermission to reproduce items where third-party owned material protected by copyright is included has been sought and cl"
    },
    {
      "id": "9618-2025-on-43-q01",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 1,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 31,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_43.pdf?download=true",
      "source_pages": [
        2,
        3,
        4,
        5,
        6,
        7,
        8
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-43-q01-p01.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p02.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p03.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p04.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p05.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p06.png",
        "9618-practical-programming/assets/9618-2025-on-43-q01-p07.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-43-q01",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_43.pdf?download=true",
        "source_pages": [
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19
        ],
        "marks": 31
      },
      "text_excerpt": "A program stores data for a board game using Object-Oriented Programming (OOP). The game 1\nhas objects that are placed on the board. Each object has a string code (for example ) and an\n\"A\"\ninteger value (for example, ).\n2\nThe class stores the data about the objects that can be placed on the board:\nBoardObject\nBoardObject\nstores the board object’s code\nCode : String\nstores the integer value of the board object\nValue : Integer\ninitialises the attributes to the parameter values\nConstructor()\nreturns\nGetCode() Code\nreturns\nGetValue() Value\nWrite program code to declare the class and its constructor. (a) (i)\nBoardObject\nDo declare the other methods. not\nUse your programming language appropriate constructor.\nIf you are writing in Python, include attribute declarations using comments.\nSave your program as Question1_N25.\nCopy and paste the program code into part in the evidence document. 1(a)(i)\n[5]\n© UCLES 2025 9618/43/O/N/25\n3\nThe methods and return the appropriate attribute. (ii)\nGetCode() GetValue()\nWrite program code for and\nGetCode() GetValue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(ii)\n[3]\nThe table shows the code and value of board objects. The table has the variable (iii) five\nidentifier where each of the objects are stored.\nVariable\nCode Value\nidentifier\nObject1 \"A\" 2\nObject2 \"B\" 3\nObject3 \"C\" 5\nObject4 \"D\" 2\nObject5 \"E\" 7\nWrite program code for the main program to instantiate each of the board objects five\nand store them in the variables with the identifiers given.\nSave your program.\nCopy and paste the program code into part in the evidence document. 1(a)(iii)\n[3]\n[Turn over © UCLES 2025 9618/43/O/N/25\n4\nThe board objects are placed on a board that is represented by a 0-indexed 2D array: (b)\n• the board is a 10 x 10 grid\n• each position on the board is identified by a row and column number\n• rows are numbered 0 to 9\n• columns are numbered 0 to 9\n• board objects can be placed at a row and column position\n• each board position is initialised with an empty , an empty\nBoardObject BoardObject\nhas and\nCode = \"-\" Value = 0\nFor example, the element highlighted in the given board is in row 1 and column 3.\nRow Column\n0 1 2 3 4 5 6 7 8 9\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9\nThe class stores the data about the board and where the board objects are placed.\nBoard\nBoard\nstores the board contents as a 2D array of TheBoard : ARRAY[0:9, 0:9] of BoardObject\n10 x 10 elements of type\nBoardObject\ninitialises each of elements to Constructor() TheBoard\nan empty with\nBoardObject Code = \"-\"\nand\nValue = 0\ntakes a row and column number as GetObject()\nparameters and returns the\nBoardObject\nat the row, column position\ntakes a , row number and SetObject() BoardObject\ncolumn number as parameters. Stores the\nin at the given\nBoardObject TheBoard\nrow, column position\noutputs the code of each DisplayBoard() BoardObject\nstored in , one row at a time\nTheBoard\n© UCLES 2025 9618/43/O/N/25\n5\nWrite program code to declare the class and its construct"
    },
    {
      "id": "9618-2025-on-43-q02",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 2,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 24,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_43.pdf?download=true",
      "source_pages": [
        9,
        10,
        11
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-43-q02-p01.png",
        "9618-practical-programming/assets/9618-2025-on-43-q02-p02.png",
        "9618-practical-programming/assets/9618-2025-on-43-q02-p03.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-43-q02",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_43.pdf?download=true",
        "source_pages": [
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29,
          30,
          31
        ],
        "marks": 24
      },
      "text_excerpt": "A program reads string data from a text file into a linear queue and then compresses the data. 2\nThe queue is created using the global 1D array . The queue can store up to 100 elements.\nQueue\nEach element is initialised to the empty string\n\"\"\nThe queue has two pointers that are global to the program:\n• that points to the index of the first element in the queue, initialised to\nQueueHead –1\n• that points to the index of the last element in the queue, initialised to\nQueueTail –1\nThe global variable stores the number of elements stored in the queue, initialised\nNumberItems\nto\n0\nWrite program code to declare and initialise , , and (a)\nQueue QueueHead QueueTail\nNumberItems\nSave your program as Question2_N25.\nCopy and paste the program code into part in the evidence document. 2(a)\n[2]\nThe function takes a string as a parameter. The function checks if the queue is (b)\nEnqueue()\nfull, and returns Boolean if the queue is full.\nFALSE\nIf the queue is not full, the parameter is inserted into the next position in . The function\nQueue\nupdates the appropriate pointer(s), updates and then returns Boolean\nNumberItems TRUE\nWrite program code for\nEnqueue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(b)\n[5]\nThe function returns the string if the queue is empty. (c)\nDequeue() \"False\"\nIf the queue is not empty, the function returns the next element in the queue. The function\nupdates the appropriate pointer(s) and updates\nNumberItems\nWrite program code for\nDequeue()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(c)\n[3]\n[Turn over © UCLES 2025 9618/43/O/N/25\n10\nThe text file stores individual binary digits, and . Each digit is on (d)\nBinaryData.txt '1' '0'\na new line. For example, the first line in the text file stores , the second line stores\n'1' '1'\nThe procedure reads in each line from the text file and\nReadData() BinaryData.txt\ninserts it into the queue using the appropriate method.\nThe procedure needs to work for a text file with any number of lines up to a maximum of 100.\nWrite program code for\nReadData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 2(d)\n[5]\nThe string data in the text file is compressed. (e)\nThe compression algorithm counts the number of times each binary digit appears\nconsecutively, then stores the binary digit followed by the number of times it appears. The\nalgorithm stores the compressed data in a single string.\nFor example, if the text file contains the data:\n1\n1\n0\n0\n0\n1\n1\n1\nThe compression algorithm will create the string because there are two digits,\n\"120313\" '1'\nfollowed by three digits, followed by three digits.\n'0' '1'\nThe procedure uses to remove each element from the queue in\nCompress() Dequeue()\nturn. The procedure then compresses the data following the compression algorithm described.\nThe new compressed string is stored in the global variable\nNewString\nYou can assume that one binary digit will never appear m"
    },
    {
      "id": "9618-2025-on-43-q03",
      "subject": "9618",
      "year": 2025,
      "session": "Oct/Nov",
      "session_code": "on",
      "paper": 4,
      "variant": "43",
      "question_number": 3,
      "topic_number": null,
      "topic": "Practical programming",
      "topic_slug": "9618-practical-programming",
      "marks": 20,
      "source_pdf": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_qp_43.pdf?download=true",
      "source_pages": [
        12,
        13,
        14,
        15,
        16
      ],
      "local_pdf": "_source-pdfs/2025-oct-nov/qp/9618_w25_qp_43.pdf",
      "image_paths": [
        "9618-practical-programming/assets/9618-2025-on-43-q03-p01.png",
        "9618-practical-programming/assets/9618-2025-on-43-q03-p02.png",
        "9618-practical-programming/assets/9618-2025-on-43-q03-p03.png",
        "9618-practical-programming/assets/9618-2025-on-43-q03-p04.png",
        "9618-practical-programming/assets/9618-2025-on-43-q03-p05.png"
      ],
      "answer": {
        "status": "available",
        "id": "9618-2025-on-43-q03",
        "html": "9618-practical-programming/answers.html",
        "source_pdf": "_source-pdfs/2025-oct-nov/ms/9618_w25_ms_43.pdf",
        "source_pdf_url": "https://pastpapers.co/api/file/caie/A-Level/Computer%20Science%20%28for%20first%20examination%20in%202021%29%20%289618%29/2025-Oct-Nov/9618_w25_ms_43.pdf?download=true",
        "source_pages": [
          32,
          33,
          34,
          35,
          36,
          37,
          38,
          39
        ],
        "marks": 20
      },
      "text_excerpt": "A program is written to perform different individual processes using arrays. 3\nA 1D array stores 10 integers. (a)\nA recursive function takes three parameters: (i)\nRecursiveCount()\n• , an array of integers\nArrayCopy\n• , the number of elements in the array of integers\nNumberElements\n• , an integer data to find in the array.\nDataToFind\nThe function counts and returns the number of times is in\nDataToFind ArrayCopy\nThe recursive algorithm:\n• returns if there are no elements in\n0 ArrayCopy\n• compares the first element in with\nArrayCopy DataToFind\n◦ if the element matches, the function returns added to the return value from a\n1\nrecursive call (passing the array without the first element)\n◦ if the element does match, the function returns the return value from a not\nrecursive call (passing the array without the first element).\nWrite program code for\nRecursiveCount()\nSave your program as Question3_N25.\nCopy and paste the program code into part in the evidence document. 3(a)(i)\n[6]\nThe main program stores the following data in a 1D array of integers in the order given: (ii)\n0 5 1 2 5 9 9 6 5 0\nThe main program calls with the parameters:\nRecursiveCount()\n• as the data to find\n0\n• as the number of elements\n10\n• the array of 10 integers.\nThe return value is output.\nWrite program code for the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(a)(ii)\n[3]\n© UCLES 2025 9618/43/O/N/25\n13\nTest your program. (iii)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 3(a)(iii)\n[1]\nThe program stores the following string. The string has four statements that are each (b)\nterminated by a semi-colon\n';'\n\"x=0;y=1;x=x+y;y++;\"\nWrite program code to amend the main program to store the string (i)\n\"x=0;y=1;x=x+y;y++;\"\nin a local variable.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(i)\n[1]\nThe function splits a string parameter into individual lines of code. (ii) four\nSplitData()\nThe function creates an array of the strings where each line is stored in a new array\nelement without the semi-colon.\nThe function returns the array of strings.\nDo use an inbuilt function to split the string. not\nWrite program code for\nSplitData()\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(ii)\n[6]\nThe main program needs to call with the string from part 3(b)(i). The (iii)\nSplitData()\nmain program then needs to output each element from the returned array on a new line.\nWrite program code to amend the main program.\nSave your program.\nCopy and paste the program code into part in the evidence document. 3(b)(iii)\n[2]\nTest your program. (iv)\nTake a screenshot of the output(s).\nSave your program.\nCopy and paste the screenshot(s) into part in the evidence document. 3(b)(iv)\n[1]\n© UCLES 2025 9618/43/O/N/25\n14\nBLANK PAGE\n© UCLES 2025 9618/43/O/N/25\n15\nBLANK PAGE\n© UCLES 2025 9618/43/O/N/25\n16\nBLAN"
    }
  ]
}