Year 9 Control Structures and Logic Gates Worksheet
Computer Science
Year 9
10 questions
~20 mins
0 views0 downloads
About This Worksheet
This worksheet covers basic control structures such as if statements and loops, as well as logic gates. Complete the tasks to demonstrate your understanding of these concepts.
Worksheet Preview
Full preview • 10 questions
Year 9 Control Structures and Logic Gates Worksheet
Subject: Computer ScienceGrade: Year 9
Name:
Date:
TeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizz
Untitled Worksheet
Grade Year 9
A
Questions
This worksheet covers basic control structures such as if statements and loops, as well as logic gates. Complete the tasks to demonstrate your understanding of these concepts.
Answer all questions in the spaces provided.
1.
Write a simple pseudocode snippet that uses an 'if' statement to check if a number stored in variable 'score' is greater than or equal to 50. If true, output 'Pass'.
[4 marks]2.
Describe in your own words what a 'for' loop does in programming. Provide an example scenario where a 'for' loop might be used.
[3 marks]3.
Complete the truth table for an AND gate with two inputs, A and B. Fill in the output column based on the logic of AND.
[4 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
4.
Draw a logic circuit diagram for an OR gate with two inputs. Label all parts clearly.
[6 marks]Drawing / Sketch space
5.
Explain what the output will be if the inputs to a NOT gate are both true and both false. Use logical terms in your explanation.
[3 marks]6.
Write a Python 'while' loop that keeps asking the user to enter a password until they enter the correct password 'admin123'.
[5 marks]7.
Describe a real-world scenario where a nested 'if' statement might be necessary. Explain your reasoning.
[4 marks]8.
Sketch a flowchart diagram for a program that checks if a number is positive, negative, or zero. Include decision points and output actions.
[8 marks]Drawing / Sketch space
9.
What is the main difference between an 'if' statement and a 'switch' statement? Provide a brief explanation.
[3 marks]10.
Draw a truth table for an XOR gate with two inputs, A and B. Label the inputs and output clearly.
[4 marks]Drawing / Sketch space
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