Grade 12 Computer Science and Programming Practice Tests

These Grade 12 Computer Science and Programming practice tests build foundations in coding, algorithms, data structures, databases, web development, cybersecurity, artificial intelligence, testing, and responsible technology use.

Skills covered

  • Programming foundations: variables, conditionals, loops, functions, arrays, Boolean values, tracing, syntax errors, pseudocode, and input validation
  • Algorithms and data structures: binary representation, algorithms, complexity, recursion, stacks, queues, sorting, searching, abstraction, and modularity
  • Data and security: tables, primary keys, SQL retrieval, encryption, authentication, authorization, phishing, backups, sanitization, and data minimization
  • Web and software development: HTML, CSS, APIs, client-server systems, version control, unit testing, documentation, accessibility, responsive design, and deployment
  • Computational thinking and AI: training data, algorithmic bias, ethics, debugging, decomposition, pattern recognition, trade-offs, open source, and project reflection

How to use these practice tests

Trace each step carefully, define the data or system concept, and consider what the program or technology should do under the stated conditions. When questions involve real users, include security, accessibility, privacy, and ethical effects in your reasoning.

For more Grade 12 preparation, return to the College and Career Preparation category.

5. Test

Grade 12 Computer Science and Programming Practice Tests

Practice Grade 12 Computer Science and Programming questions about code, algorithms, data structures, databases, web development, security, artificial intelligence, and software projects.

Choose the best answer. Trace the logic, identify the system or data concept, and consider reliability, security, accessibility, and ethical effects where relevant.

10 Questions
0/10 Questions0 %
Correct 0
Incorrect 0
Unanswered 10
1. QuestionMultiple choice

What is training data in a machine-learning system?

Please select an answer first.

Correct answer: A

The correct answer is Data used to help a model learn patterns or relationships for a task.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Training data influences what patterns a model learns, so its quality, coverage, labeling, and representation matter.
  3. Check the result: The correct answer is Data used to help a model learn patterns or relationships for a task.

Training data influences what patterns a model learns, so its quality, coverage, labeling, and representation matter.

2. QuestionMultiple choice

What is algorithmic bias?

Please select an answer first.

Correct answer: B

The correct answer is A systematic pattern of unfair or inaccurate outcomes associated with data, design, or use of an algorithm.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Bias can enter through data, labels, objectives, features, implementation, deployment context, or unequal effects on groups.
  3. Check the result: The correct answer is A systematic pattern of unfair or inaccurate outcomes associated with data, design, or use of an algorithm.

Bias can enter through data, labels, objectives, features, implementation, deployment context, or unequal effects on groups.

3. QuestionMultiple choice

Which is an ethical question about automated decision systems?

Please select an answer first.

Correct answer: C

The correct answer is Whether the system is fair, explainable, accountable, privacy-respecting, and appropriate for the decision.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Ethical evaluation considers rights, harms, benefits, transparency, responsibility, consent, and the consequences of deployment.
  3. Check the result: The correct answer is Whether the system is fair, explainable, accountable, privacy-respecting, and appropriate for the decision.

Ethical evaluation considers rights, harms, benefits, transparency, responsibility, consent, and the consequences of deployment.

4. QuestionMultiple choice

What is a useful debugging process?

Please select an answer first.

Correct answer: D

The correct answer is Reproduce the problem, isolate its cause, test a fix, and verify that the change did not create new errors.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Systematic debugging uses evidence and controlled changes so the cause and effect of a fix can be evaluated.
  3. Check the result: The correct answer is Reproduce the problem, isolate its cause, test a fix, and verify that the change did not create new errors.

Systematic debugging uses evidence and controlled changes so the cause and effect of a fix can be evaluated.

5. QuestionMultiple choice

What is computational thinking?

Please select an answer first.

Correct answer: A

The correct answer is Using decomposition, abstraction, pattern recognition, algorithms, and evaluation to solve problems.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Computational thinking is a problem-solving approach that can be used with or without writing code.
  3. Check the result: The correct answer is Using decomposition, abstraction, pattern recognition, algorithms, and evaluation to solve problems.

Computational thinking is a problem-solving approach that can be used with or without writing code.

6. QuestionMultiple choice

What is decomposition?

Please select an answer first.

Correct answer: B

The correct answer is Breaking a complex problem into smaller, manageable parts.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Decomposition makes a problem easier to understand, assign, implement, test, and revise.
  3. Check the result: The correct answer is Breaking a complex problem into smaller, manageable parts.

Decomposition makes a problem easier to understand, assign, implement, test, and revise.

7. QuestionMultiple choice

What is pattern recognition in problem solving?

Please select an answer first.

Correct answer: C

The correct answer is Identifying similarities or regularities that can guide a solution.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Recognizing patterns can reveal reusable rules, likely causes, efficient algorithms, or relevant examples.
  3. Check the result: The correct answer is Identifying similarities or regularities that can guide a solution.

Recognizing patterns can reveal reusable rules, likely causes, efficient algorithms, or relevant examples.

8. QuestionMultiple choice

Why might a programmer choose a faster algorithm that uses more memory?

Please select an answer first.

Correct answer: D

The correct answer is The trade-off may reduce running time when the available memory and requirements allow it.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Algorithm design often balances time, space, simplicity, scalability, cost, and reliability rather than optimizing one factor in isolation.
  3. Check the result: The correct answer is The trade-off may reduce running time when the available memory and requirements allow it.

Algorithm design often balances time, space, simplicity, scalability, cost, and reliability rather than optimizing one factor in isolation.

9. QuestionMultiple choice

What does open-source software generally mean?

Please select an answer first.

Correct answer: A

The correct answer is Software whose source code is made available under a license that permits specified use, study, modification, or sharing.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Open-source permissions depend on the license, and users should follow its conditions for attribution, distribution, and modification.
  3. Check the result: The correct answer is Software whose source code is made available under a license that permits specified use, study, modification, or sharing.

Open-source permissions depend on the license, and users should follow its conditions for attribution, distribution, and modification.

10. QuestionMultiple choice

Why should a developer reflect after completing a project?

Please select an answer first.

Correct answer: B

The correct answer is To identify what worked, what failed, what was learned, and what should change next time.

  1. Identify the computer science concept: Determine whether the question concerns programming, algorithms, data structures, systems, web development, security, data, artificial intelligence, or ethics.
  2. Trace the logic or principle: Reflection turns project experience into improvements in process, design, testing, communication, and future decisions.
  3. Check the result: The correct answer is To identify what worked, what failed, what was learned, and what should change next time.

Reflection turns project experience into improvements in process, design, testing, communication, and future decisions.

Previous testNext test