[go: up one dir, main page]

0% found this document useful (0 votes)
9 views8 pages

Grade 9 Comp

The document is a first-term examination for Grade 9 Computer Science, covering multiple choice, true or false, fill in the blanks, and definition questions related to programming concepts. It includes sections on pseudocode, algorithms, data structures, and the interaction between hardware and software. The exam is structured to assess students' understanding of fundamental computer science principles and programming techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views8 pages

Grade 9 Comp

The document is a first-term examination for Grade 9 Computer Science, covering multiple choice, true or false, fill in the blanks, and definition questions related to programming concepts. It includes sections on pseudocode, algorithms, data structures, and the interaction between hardware and software. The exam is structured to assess students' understanding of fundamental computer science principles and programming techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Computer Science

First-Term Examination SY 2025


GRADE 9
Name: _________________________________ Date: ____________
(Write your complete name)

Part Question/Portion Score

1 Multiple choice /15

2 True or False /15

Fill in the blanks /15

3 Definition of terms /20

Reading In computer science /15

Total score: /100

Final mark:

Checked by: Teacher Felix Pedro.

Comments:
2
1. Multiple Choice. Choose the correct option and write the letter on the space
provided[15]
______1 What is the purpose of pseudocode?
a) To write final executable code
b) To explain an algorithm in a human-readable way
c) To design graphics for a program
d) To replace programming languages
______2 Which of the following is NOT a characteristic of a good algorithm?
a) It must be finite
b) It must be unambiguous
c) It must be complex and difficult to understand
d) It must produce a correct output
______3 What does a flowchart use to visually represent an algorithm?
a) Text and paragraphs
b) Symbols and arrows
c) Tables and graphs
d) Screenshots of code
______4 What is a logic error in pseudocode?
a) An error in the syntax of the pseudocode
b) An error that causes the program to crash
c) An error where the program runs but produces incorrect results
d) An error in hardware
______5 In a flowchart, which shape is commonly used to represent a decision?
a) Oval
b) Rectangle
c) Diamond
d) Circle
______6 What is iteration in programming?
a) A type of error in a program
b) The process of repeating a set of instructions
c) A way to define variables
d) A type of condition in a loop
______7 Which loop repeats a set number of times?
a) Condition-controlled loop
b) Count-controlled loop

© UCLES 2015 0417/11/O/N/15


3
c) Infinite loop
d) While loop
______8 What does a For loop typically use to keep track of repetitions?
a) A string variable
b) A condition that always stays false
c) A counter variable that increments
d) A random number generator
______9 What is the main difference between a condition-controlled loop and a count-
controlled loop?
a) Condition-controlled loops use a condition to stop, while count-controlled loops repeat a
set number of times
b) Count-controlled loops only work with numbers, while condition-controlled loops work with
words
c) Condition-controlled loops always run forever
d) Count-controlled loops do not use a variable
______10 What is an infinite loop?
a) A loop that stops after one repetition
b) A loop that does not execute
c) A loop that runs forever without stopping
d) A loop that runs exactly ten times
______11 What is an array in programming?
a) A single value stored in memory
b) A data structure that stores multiple values of the same type
c) A function that converts data types
d) A loop that runs indefinitely
______12 What does the append () function do in Python?
a) Removes an item from a list
b) Adds an item to the end of a list
c) Finds the length of a list
d) Converts a string to uppercase
______13 What is the purpose of casting in programming?
a) To change a variable’s data type
b) To create an infinite loop
c) To remove an item from a list
d) To find an index in a list

© UCLES 2015 0417/11/O/N/15 [Turn over


4
______14 Which data type represents whole numbers in Python?
a) Boolean
b) String
c) Integer
d) Real
______15 What does the Upper () function do to a string?
a) Converts all characters to lowercase
b) Finds the length of the string
c) Converts all characters to uppercase
d) Splits the string into multiple parts

2. True or False Questions. IF the statement is true: write T, ELSE: write F [15]

______1 Pseudocode is written in a specific programming language.


______2 A logic error can cause a program to run incorrectly without displaying an error
message.
______3 Flowcharts are used to represent algorithms graphically.
______4 Pseudocode must be compiled before it can run.
______5 A good algorithm should always have clear and specific steps.
______6 A For loop is an example of a count-controlled loop.
______7 A condition-controlled loop always runs a fixed number of times.
______8 An infinite loop is useful when writing efficient programs.
______9 Incrementing means increasing the value of a variable, usually by a fixed amount.
______10A loop is used to repeat a block of code multiple times.
______11A Boolean data type can only have two values: True or False.
______12The Len () function is used to find the number of elements in a List.
______13A real number is the same as an integer.
______14The Lower () function converts all characters in a string to uppercase.
______15Nesting refers to placing one structure inside another, such as a loop inside another
loop

3. Fill in the Blanks Questions [15]

condition, condition-controlled loop, count-controlled loop, For loop, increment, infinite loop,
iteration, loop, algorithm, logic, flowchart, oval or terminator, actual or programming, append(),
array, Boolean, casting, character, data structure, index, integer, Len(), List, Lower(), nesting, real,
string, Upper()
© UCLES 2015 0417/11/O/N/15
5
1. A(n) ________ is a step-by-step procedure for solving a problem.

2. A ________ error occurs when a program runs but produces an incorrect output.

3. A ________ is a diagram that represents the flow of an algorithm using symbols.


4. The ________ symbol in a flowchart represents the start or end of a process.
5. Pseudocode is useful for designing an algorithm before writing ________ code.
6. A ________ is a programming structure that repeats a set of instructions.
7. A ________ loop repeats based on a true or false expression.
8. A ________ loop repeats a fixed number of times using a counter.
9. The ________ loop is commonly used when the number of iterations is known.
10. If a loop does not have a stopping condition, it may result in a(n) ________ loop.
11. An ________ is a position number that helps access specific elements in a list or array.
12. A ________ is a data structure that stores multiple values, such as numbers or strings.
13. The ________ function is used to add an item to the end of a list.
14. A ________ is a single letter, number, or symbol stored as a string.
15. The function ________ converts all letters in a string to lowercase.

2. Define the Following [10]

1. Pseudocode
_________________________________________________________________________
_________________________________________________________________________
2. Binary search
_________________________________________________________________________
_________________________________________________________________________
3. Syntax error
_________________________________________________________________________
_________________________________________________________________________
4. Validation
_________________________________________________________________________
_________________________________________________________________________
5. Efficiency
_________________________________________________________________________
_________________________________________________________________________

© UCLES 2015 0417/11/O/N/15 [Turn over


6
Reading in Computer Science

In the world of computers, hardware and software work together to make a computer functional.
Hardware refers to the physical components of a computer, such as the CPU (Central Processing
Unit), RAM (Random Access Memory), and storage devices like hard drives or solid-state drives.
Software, on the other hand, is the collection of programs and applications that run on the
computer. It includes the operating system, programs like Microsoft Word, and tools for
programming like Python or Java.

To interact with computers, we use input and output devices. Input devices allow users to send
data into the computer. Some examples are keyboards, mice, microphones, and scanners. These
devices collect data or commands from the user, which is then processed by the computer. On the
other hand, output devices display or produce the results of a computer's processing. Monitors,
printers, and speakers are examples of output devices that allow us to see, hear, or print the
processed data.

Now, when we create programs, we need to understand how to manage data and control how
information flows in the program. Programming with data involves using data structures like arrays
or lists, which allow us to store multiple values, such as integers, real numbers, strings, and
Boolean values. For example, a list in Python can store a collection of data, and we can access
these values using indexes. The Len () function is used to find the number of elements in a list,
and we can use the append () function to add new elements.

When we need to process data or repeat actions, we use loops like the For in Range loop, which
repeats a set of instructions a specific number of times. Condition-controlled loops are used when
we don’t know how many times a loop will run, and it continues until a certain condition is met.
These loops help us automate tasks that would otherwise be repetitive.

Pseudocode is a tool used to design algorithms before writing actual code. It helps programmers
plan out the steps of a program using simple, easy-to-understand language. In pseudocode, we
use commands like "if" for decision-making, "for" and "while" for loops, and "append ()" for adding
data to a list. For example, a pseudocode to sum the numbers in a list might look like this:

Start

Initialize total to 0

For each number in the list

© UCLES 2015 0417/11/O/N/15


7
Add number to total

End For

Print total

End

Understanding how hardware and software interact, as well as knowing how to manipulate data in
your programs, is crucial for creating effective computer programs. By learning to plan and break
down problems into pseudocode, we can efficiently write real code in programming languages like
Python.

Questions [15]

1. What is the difference between hardware and software?


_________________________________________________________________________
______________________________________________________________________ [2]
2. Give two examples of input devices and two examples of output devices.
______________________________________________________________________ [2]
3. What is the purpose of the append () function in Python?
______________________________________________________________________ [1]
4. Explain the role of a loop in a program and provide an example of a for loop.
_________________________________________________________________________
_______________________________________________________________________ [2
5. What is pseudocode, and why is it useful for programmers?
_________________________________________________________________________
______________________________________________________________________ [2]
6. What does the Len () function do in Python?
______________________________________________________________________ [1]
7. What is an array, and how is it different from a list?
_________________________________________________________________________
______________________________________________________________________ [2]
8. Why is nesting important in programming, and can you give an example?
_________________________________________________________________________
______________________________________________________________________ [2]
9. What is the significance of an index in accessing data in a list or array?
______________________________________________________________________ [1]
© UCLES 2015 0417/11/O/N/15 [Turn over
8

© UCLES 2015 0417/11/O/N/15

You might also like