Free Grade 9 Computer Science Worksheets with Answers
Grade 9 (US) · Year 10 (UK) · Class 9 (India) · ages 14–15
16 printable Grade 9 computer science worksheets, each with a full answer key. Open a topic to print it or save it as a PDF. Grade 9 Computer Science builds programming fundamentals: binary arithmetic, hexadecimal, control structures, lists, searching and sorting, Boolean logic and networks.
- Answer keys checked by code
- No ads, ever
- No student accounts needed
- Safety & privacy
Unit 1: Data Representation
Data & Analysis
Unit 2: Programming Fundamentals
Algorithms & Programming
Control Structures
Grade 9 Tracing Code (Python)
3A-AP-15
Reading short Python programs with variables, if/else and loops and working out what they print.
e.g. total = 0; for i in range(1, 8): total = total + i * 1; print(total). What is printed?
Worksheet + answer key →
Grade 9 Tracing Loops
3A-AP-15
Tracing repeat and nested loops to find the final value or the number of times something happens.
e.g. total starts at 0. The loop repeats 3 times: total = total - 3. What is total at the end?
Worksheet + answer key →
Unit 3: Algorithms
Algorithms & Programming
Unit 4: Logic
Computing Systems
Boolean Logic & Gates
Grade 9 Boolean Expressions
Evaluating Boolean expressions with AND, OR and NOT, including comparisons.
e.g. What is the value of not (False and False) or False?
Worksheet + answer key →
Grade 9 Logic Gates
Working out the outputs of AND, OR, NOT and XOR gates and small logic circuits.
e.g. A circuit computes (A OR B) XOR C with A = 0, B = 1, C = 0. What is the output?
Worksheet + answer key →
Unit 5: Networks & Cybersecurity
Networks & the Internet
Unit 6: Going Further
Enrichment for curious students
Advanced: Functions & Efficiency
Grade 9 Functions & Return Values
Advanced
Tracing functions with parameters and return values, including functions that call other functions.
e.g. def f(x): return 2 * x + 2. What does print(f(f(2))) show?
Worksheet + answer key →
Grade 9 Algorithm Efficiency (Big-O)
Advanced
Comparing how the number of steps grows: O(1), O(log n), O(n) and O(n²).
e.g. What is the time complexity of this code: for k in range(11):; print(k)? Choose O(1), O(log n), O(n) or O(n²).
Worksheet + answer key →
Need more Grade 9 computer science practice?
Generate unlimited fresh worksheets at easy, medium or hard difficulty. Free during our launch — no card needed.
Create a free accountFrequently asked questions
Are these Grade 9 computer science worksheets free?
Yes. Every Grade 9 computer science worksheet on this page is free to print or save as a PDF, and each one includes a full answer key.
What is Grade 9 in the UK and India?
Grade 9 in the US is roughly Year 10 in the UK and Class 9 in India, for students aged about 14–15. Curricula differ, so pick topics by what your child or class is learning.
What computer science topics are covered in Grade 9?
16 topics, including Binary Numbers, Hexadecimal, Bits, Bytes & Data Sizes, Variables & Data Types, Tracing Code (Python), Tracing Loops and more.
Can I get different versions of a worksheet?
Yes. Create a free account to generate unlimited new versions at easy, medium or hard difficulty, each with its own answer key.