Year 7 Computer Science: File Handling and Logic Gates

Computer Science
Year 7
11 questions
~22 mins
0 views0 downloads

About This Worksheet

This worksheet covers basic concepts of file handling in programming and logic gates. Answer each question carefully to demonstrate your understanding.

Worksheet Preview

Full preview • 11 questions

Year 7 Computer Science: File Handling and Logic Gates

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

Untitled Worksheet

Grade Year 7
A

Questions

This worksheet covers basic concepts of file handling in programming and logic gates. Answer each question carefully to demonstrate your understanding.

Answer all questions in the spaces provided.
1.
Name three types of data that can be stored in a text file when programming.
[3 marks]
2.
Explain why it is important to close a file after opening it in a program.
[3 marks]
3.
Describe the steps involved in reading data from a file in a programming language such as Python.
[4 marks]
4.
Complete the truth table for a logical AND gate with two inputs, A and B. Fill in the output column.
[4 marks]
ABOutput
00
01
10
11
5.
Complete the truth table for a logical OR gate with two inputs, A and B. Fill in the output column.
[4 marks]
ABOutput
00
01
10
11
6.
Draw a logic circuit that shows an AND gate connected to two switches, where the output is ON only when both switches are ON.
[6 marks]
Drawing / Sketch space
7.
Sketch a simple file handling process that reads data from a file, processes it, and then outputs the result. Label each step clearly.
[8 marks]
Drawing / Sketch space
8.
Write a short explanation of what a boolean value is in programming.
[2 marks]
9.
If a program reads a file line by line, what is one way to know when it has finished reading the entire file?
[3 marks]
10.
Describe what a 'file mode' is when opening a file in a program, giving an example of two common modes.
[3 marks]
11.
Draw a truth table for a NOT gate with a single input.
[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