0% found this document useful (0 votes)
8 views6 pages

Creative Technologies 8: Algorithm Test

Uploaded by

Ginny Genove
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)
8 views6 pages

Creative Technologies 8: Algorithm Test

Uploaded by

Ginny Genove
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

Summative Test – Creative Technologies 8

Topic: Describing and Developing Algorithms; Recognizing Alternative Algorithms;


Variables in Programming

Cognitive Focus: HOTS & SOLO Taxonomy (Relational to Extended Abstract)

Name: ____________________________ Score: ____________ Date: ____________

Directions: Read each question carefully. Choose the letter of the best answer that
completes each statement or answers the question.

1. A teacher asks her students to create an algorithm for making a sandwich. Which of the
following shows a clear algorithmic process?

 A. Make a sandwich.
 B. Put bread, ham, and cheese together.
 C. Get two slices of bread → place ham and cheese between them → close the sandwich
→ serve.
 D. Eat the sandwich immediately.

Answer: C

2. You are designing an algorithm to prepare a cup of coffee. What should be your first step?

 A. Pour water into the cup


 B. Boil water
 C. Add coffee powder
 D. Decide how many cups to make

Answer: D

3. In a flowchart, which symbol best represents a decision point such as 'Is water boiling?'

 A. Rectangle
 B. Diamond
 C. Oval
 D. Parallelogram

Answer: B
4. A vending machine algorithm gives drinks after payment. Which step ensures fairness in
the process?

 A. Insert coin → dispense drink → thank user


 B. Insert coin → check if correct amount → dispense drink
 C. Press button → insert coin → dispense drink
 D. Insert coin → wait → cancel process

Answer: B

5. You are tasked to develop an algorithm for logging into a school portal. What is the most
logical sequence?

 A. Enter username → enter password → click login → verify credentials


 B. Click login → verify credentials → enter username → enter password
 C. Enter password → click login → enter username → verify
 D. Verify → click login → enter details

Answer: A

6. A student designs two algorithms for sorting numbers. Algorithm A uses fewer steps but
takes more time. Algorithm B uses more steps but runs faster. What can be concluded?

 A. Algorithm A is always better.


 B. Algorithm B is better because it is faster.
 C. The better algorithm depends on the situation or system requirements.
 D. Both are equal since they produce the same output.

Answer: C

7. Two algorithms both calculate the total cost of groceries but use different loops (for vs
while). What does this show about algorithm design?

 A. Algorithms can vary in syntax but still solve the same problem.
 B. The for loop is always better.
 C. Only one loop type should be used.
 D. Algorithms must look identical to work.

Answer: A

8. When solving a maze problem, Algorithm X uses 'left-hand rule,' while Algorithm Y uses
'right-hand rule.' What does this illustrate?

 A. Algorithms can have multiple valid approaches to the same problem.


 B. Only one algorithm can be correct.
 C. Algorithms should not have variations.
 D. Both are incorrect because they are opposites.

Answer: A

9. You are asked to optimize an algorithm for searching student names. The current
algorithm checks names one by one. Which alternative shows better efficiency?

 A. Randomly guessing a name


 B. Using binary search on a sorted list of names
 C. Checking only the last name in the list
 D. Asking the teacher for help

Answer: B

10. In a simple temperature conversion program, which variable name is most appropriate
for storing the value in Celsius?

 A. x1
 B. tempC
 C. variable1
 D. data

Answer: B

11. A student writes: total = price * quantity. What kind of variable is total?

 A. Boolean
 B. Integer or Float
 C. String
 D. Character

Answer: B

12. Which variable name follows good naming conventions in programming?

 A. 1stNumber
 B. number one
 C. firstNumber
 D. FIRST NUMBER

Answer: C
13. Your friend writes an algorithm for computing grades but it produces wrong results.
What should be your first step?

 A. Change the computer


 B. Debug the algorithm to identify where the logic fails
 C. Add more steps randomly
 D. Recode everything from scratch

Answer: B

14. During a class project, your group develops an algorithm that’s too long. How can you
simplify it without changing the result?

 A. Remove all comments


 B. Merge repeated steps into functions or loops
 C. Delete half the code
 D. Add more variables

Answer: B

15. You are designing an ATM withdrawal algorithm. What should happen if the withdrawal
amount is greater than the account balance?

 A. Proceed anyway
 B. Dispense partial cash
 C. Display 'Insufficient Balance' message
 D. Restart the program

Answer: C

16. A program asks for a user’s age and stores it as a variable. Which step validates the input
correctly?

 A. Check if the value entered is a number


 B. Store any value entered
 C. Ignore the input
 D. Convert it automatically to text

Answer: A

17. You created an algorithm to count how many students passed an exam. Which variable
is best suited for tracking the number of passers?

 A. score
 B. studentName
 C. totalPassed
 D. passingRate

Answer: C

18. A class is designing an algorithm to compute the average rainfall per month. Which of
the following variables is most appropriate?

 A. totalRain
 B. rainfallAverage
 C. average
 D. x

Answer: B

19. Your algorithm for sorting test scores is too slow. You realize another student’s
algorithm runs faster with the same accuracy. What’s the best conclusion?

 A. There’s always one perfect algorithm.


 B. Alternative algorithms can improve efficiency even if the result is the same.
 C. The faster one is wrong.
 D. Speed doesn’t matter in algorithms.

Answer: B

20. You are asked to design an algorithm that identifies whether a person can vote (age ≥
18). Which is the best conditional statement?

 A. if age == 18 then print('You can vote')


 B. if age < 18 then print('You can vote')
 C. if age >= 18 then print('You can vote')
 D. if age > 18 then print('You cannot vote')

Answer: C
Answer Key
No. Answer No. Answer No.

1 C 2 D

3 B 4 B

5 A 6 C

7 A 8 A

9 B 10 B

11 B 12 C

13 B 14 B

15 C 16 A

17 C 18 B

19 B 20 C

You might also like