Year 7 Computer Science: File Handling and Logic Gates Worksheet
Computer Science
Year 7
11 questions
~22 mins
0 views0 downloads
About This Worksheet
This worksheet helps you understand how computers handle files and how logic gates work. Complete the questions carefully to improve your programming skills.
Worksheet Preview
Full preview • 11 questions
Year 7 Computer Science: File Handling and Logic Gates Worksheet
Subject: Computer ScienceGrade: Year 7
Name:
Date:
TeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizzTeachWhizz
Untitled Worksheet
Grade Year 7
A
Questions
This worksheet helps you understand how computers handle files and how logic gates work. Complete the questions carefully to improve your programming skills.
Answer all questions in the spaces provided.
1.
Describe the process of opening a file for reading in a programming language of your choice. What are some common steps involved?
[4 marks]2.
Write a simple example in pseudocode that writes the text 'Hello, World!' to a file named 'greetings.txt'.
[5 marks]3.
Explain what happens when a program attempts to read from a file that does not exist.
[3 marks]4.
Complete the truth table for a AND logic gate with inputs A and B.
[4 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
5.
Complete the truth table for an OR logic gate with inputs A and B.
[4 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
6.
Draw a logic circuit that uses two AND gates and one OR gate to produce an output that is true when either both inputs are true or at least one input is true.
[6 marks]Drawing / Sketch space
7.
Sketch a flowchart that shows a program that checks if a number is greater than 10 and displays 'High' if true, or 'Low' if false.
[6 marks]Drawing / Sketch space
8.
Explain what the 'close' command does after working with a file in programming.
[3 marks]9.
Describe a scenario where reading data from a file would be useful in a programming project.
[4 marks]10.
Draw the truth table for a NOT gate with input A.
[4 marks]Drawing / Sketch space
11.
Complete the truth table for a NAND gate with inputs A and B.
[4 marks]| A | B | Output |
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
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