Year 11 Computer Science: Variables and Logic Gates Worksheet
Computer Science
Year 11
11 questions
~22 mins
0 views0 downloads
About This Worksheet
This worksheet focuses on understanding variables and logic gates in programming. Complete each question to demonstrate your knowledge.
Worksheet Preview
Full preview • 11 questions
Year 11 Computer Science: Variables and Logic Gates Worksheet
Subject: Computer ScienceGrade: Year 11
Name:
Date:
TeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizz
Untitled Worksheet
Grade Year 11
A
Questions
This worksheet focuses on understanding variables and logic gates in programming. Complete each question to demonstrate your knowledge.
Answer all questions in the spaces provided.
1.
Define a variable in programming and explain its purpose.
[3 marks]2.
Write a simple line of code in a programming language of your choice that declares an integer variable named 'score' and assigns it the value 10.
[3 marks]3.
Explain the difference between a variable's data type and its value.
[4 marks]4.
Given the following pseudo-code: 'Set total to 0; For each number from 1 to 5, add the number to total.' What is the final value of 'total'?
[4 marks]5.
Complete the truth table for an AND gate with inputs A and B. Fill in the output column.
[5 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
6.
Complete the truth table for an OR gate with inputs A and B. Fill in the output column.
[5 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
7.
Draw a logic circuit that uses AND, OR, and NOT gates to produce an output 'Z' that is true only when either 'A' is true and 'B' is false, or 'C' is true.
[7 marks]Drawing / Sketch space
8.
Sketch a flowchart diagram to represent a program that asks for the user's age and displays a message if the user is 18 or older.
[8 marks]Drawing / Sketch space
9.
Describe how variables can be used to store user input in a program.
[4 marks]10.
If a variable 'counter' starts at 0 and is incremented by 1 inside a loop that runs 10 times, what is the value of 'counter' after the loop completes?
[3 marks]11.
Explain the importance of using descriptive variable names in programming.
[3 marks]Quick Actions
What is Remix?
Create a new worksheet based on this one. Change the grade level, topic, number of questions, or difficulty - then generate a fresh version.
- • Change grade level (Grade 6 → Grade 7)
- • Swap topics (Harry Potter → Macbeth)
- • Add more questions (10 → 15)
- • Adjust difficulty
Details
- Created
- 1/2/2026
- Updated
- 1/2/2026
- Type
- worksheet