Year 8 Computer Science: Control Structures and Logic Gates Worksheet

Computer Science
Year 8
10 questions
~20 mins
0 views0 downloads

About This Worksheet

This worksheet tests your understanding of control structures, logic gates, and their applications in programming. Carefully read each question and answer to the best of your ability.

Worksheet Preview

Full preview • 10 questions

Year 8 Computer Science: Control Structures and Logic Gates Worksheet

Subject: Computer ScienceGrade: Year 8
Name:
Date:
TeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizz

Untitled Worksheet

Grade Year 8
A

Questions

This worksheet tests your understanding of control structures, logic gates, and their applications in programming. Carefully read each question and answer to the best of your ability.

Answer all questions in the spaces provided.
1.
Write a simple if statement in pseudocode that checks if a variable 'score' is greater than or equal to 50. If true, it should output 'Pass'.
[4 marks]
2.
Describe a real-world scenario where a 'while' loop might be used in programming. Explain why a loop is appropriate here.
[4 marks]
3.
Complete the truth table for an AND logic gate with inputs A and B, and output C.
[6 marks]
ABOutput
00
01
10
11
4.
Draw a logic circuit diagram for an OR gate using basic logic gate symbols. Label the inputs as A and B, and the output as C.
[8 marks]
Drawing / Sketch space
5.
Explain the difference between an 'if' statement and a 'switch' statement in programming. When might you choose one over the other?
[4 marks]
6.
Given the input values A = 1 and B = 0, what is the output of an XOR gate? Justify your answer.
[3 marks]
7.
Sketch a flowchart that represents a program which asks the user for their age and then prints 'Adult' if they are 18 or over, or 'Minor' if they are under 18.
[10 marks]
Drawing / Sketch space
8.
Design a simple pseudocode program that counts from 1 to 10 and displays each number.
[4 marks]
9.
Describe a situation where a 'do-while' loop would be more appropriate than a 'while' loop.
[4 marks]
10.
Complete the truth table for a NAND gate with inputs A and B, and output C.
[6 marks]
ABOutput
00
01
10
11

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