Introduction to Programming for Grade 7

General
General
3 questions
~6 mins
0 views0 downloads

About This Worksheet

A medium difficulty Computer Science worksheet on programming for grade 7 students. Includes questions on Basic Programming Concepts, Programming Syntax and Logic, Data Types and Variables.

Worksheet Preview

Full preview • 3 questions

Introduction to Programming for Grade 7

Subject: GeneralGrade: General
Name:
Date:

Introduction to Programming for Grade 7

Instructions: Read each question carefully. For multiple choice and true/false questions, select or mark the correct answer. For practical tasks and short answers, provide your solution or explanation in the space provided. Complete all questions to the best of your ability.
A

Basic Programming Concepts

1.
What is an algorithm?
[2 marks]
2.
Which programming language is often used for web development?
[2 marks]
AHTML
BPython
CJava
DC++
3.
True or False: Variables are used to store data in programming.
[1 mark]
B

Programming Syntax and Logic

1.
In Python, which keyword is used to define a function?
[2 marks]
Afunction
Bfunc
Cdef
Ddefine
2.
Write a short Python code snippet that prints 'Hello, World!' to the screen.
[3 marks]
3.
True or False: An 'if' statement is used to make decisions in programming.
[1 mark]
C

Data Types and Variables

1.
Which of the following is NOT a common data type?
[2 marks]
AFunction
BInteger
CString
DBoolean
2.
Create a variable named 'score' and assign it the value 100 in Python.
[3 marks]
3.
True or False: Strings are used to store numerical data.
[1 mark]
D

Practical Coding and Debugging

1.
Identify the error in the following Python code: x = 10 if x > 5 print('x is greater than 5')
[3 marks]
2.
Rewrite the following code to fix the error: for i in range(5) print(i)
[3 marks]
3.
True or False: Debugging is the process of finding and fixing errors in code.
[1 mark]
E

Scenario-Based Questions

1.
Imagine you need to write a program that calculates the average of three test scores. What steps would you include in your algorithm?
[2 marks]
2.
A game needs to check if a player has enough points to win. Which programming structure would best handle this decision?
[2 marks]
ALoop
BFunction
CConditional (if-else)
DVariable
3.
True or False: In programming, a loop allows repeated execution of a block of code.
[1 mark]
F

Software Usage and Coding Practice

1.
Use a programming environment like Python IDLE or Scratch to write and run a program that asks the user for their name and greets them.
[3 marks]
2.
What is the purpose of using comments in your code?
[2 marks]
3.
True or False: Comments are ignored by the computer when running the program.
[1 mark]

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
6/9/2025
Updated
12/29/2025
Type
worksheet