Grade 8 Comp
Grade 8 Comp
1. What is pseudocode?
a) A real programming language
b) A set of symbols used in coding
c) A way to write algorithms using simple English-like statements
d) A type of encryption
5. In a linear search algorithm, how does the program find a number in a list?
a) By dividing the list into two halves
b) By searching each element one by one
c) By sorting the list first
d) By skipping elements
10. In text-based programming, which data type holds only true or false values?
a) Integer
b) Boolean
c) String
d) Float
Match the term in Column A with the correct definition in Column B. write your answer in
the blanks
Column A Column B
1. Pseudocode is written using the exact syntax of a programming language. (True, False)
2. A binary search is more efficient than a linear search on a sorted list. (True, False)
7. A linear search checks every item in the list one by one. (True, False)
8. The binary search works on both sorted and unsorted lists. (True, False)
9. Data types in programming help define what kind of values a variable can hold. (True, False)
2. Selection in Pseudocode
_________________________________________________________________________
_________________________________________________________________________
3. Searching Algorithm
_________________________________________________________________________
_________________________________________________________________________
4. Binary Search
_________________________________________________________________________
_________________________________________________________________________
5. Linear Search
_________________________________________________________________________
_________________________________________________________________________
6. Conditional Statement
_________________________________________________________________________
_________________________________________________________________________
8. Algorithm
_________________________________________________________________________
_________________________________________________________________________
9. Variable
_________________________________________________________________________
_________________________________________________________________________
Answer any two questions from the following. Put your answers behind on the attached
papers.
2. Create a simple pseudocode to find the largest of three numbers using IF statements.
3. Write a Python program using an IF-ELSE statement that checks if a number is even or
odd.
4. Write a pseudocode to store a user's name and age, then print "You are an adult" if the age
is 18 or above.