Computer Science Principles Final Exam
(C) 3 9
What is displayed because of executing the code segment?
(A) 1 3 5 7 9
(B) 1 5 7
(C) 3 9
(D) 9
(D) Golden Bandicoot Cat Fish
What is displayed as a result of executing the code segment?
petList <-- "Dog"
APPEND (petList, "Cat)
APPEND (petList, "Fish")
INSERT (petList, 2, "Golden Bandicoot")
REMOVE (petList, 1)
FOR EACH item IN petList:
DISPLAY(item)
(A) Dog Cat Fish Golden Bandicoot
Computer Science Principles Final Exam.pdf Computer Science Principles Final Exam //2026
,2026: 100% correct -2 Computer Science Principles Final Exam Computer Science Principles Final Exam.pdf
(B) Dog Cat Fish
(C) Dog Golden Bandicoot Cat Fish
(D) Golden Bandicoot Cat Fish
(C) I and II only
At a certain high school students receive letter grades based on the following scale: 93
or above is an A, 84 to 92 is a B, 75 to 83 is a C, and below 75 is an F. Which of the
following code segments will assign the correct string to grade for a given integer
score?
I. IF (score ≥ 90){Display ("A")}IF (score ≥ 80 AND score ≤ 89){Display ("B")}IF (score ≥
70 AND score ≤ 79){Display ("C")}IF (score < 70){Display ("D")}
II. IF (score ≥ 90){Display ("A")}ELSE{IF (score ≥ 80 AND score ≤ 89){Display
("B")}ELSE{IF (score ≥ 70 AND score ≤ 79){Display ("C")}ELSE{Display ("D") }}}
III. IF (score ≥ 90){Display ("A")}IF (score ≥ 80 AND ≤ 89){Display ("B")}IF (score ≥ 70
AND ≤ 79){Display ("C")}IF (score < 70){Display ("D")}
(A) I only
(B) III only
(C) I and II only
(D) I, II, and III
(C) 24
Colors can be represented by decimal values from 0 to 255. If each pixel in a photo is a
combination of three color values, what is the minimum number of bits needed to store
a single pixel?
Computer Science Principles Final Exam.pdf Computer Science Principles Final Exam //2026
, 2026: 100% correct -3 Computer Science Principles Final Exam Computer Science Principles Final Exam.pdf
(A) 512
(B) 256
(C) 24
(D) 8
(A) All data traveling over the internet is binary.
Which of the following is a true statement about data transmitted over the internet?
(A) All data traveling over the internet is binary.
(B) Packets are received in the same order that they are sent.
(C) Redundancy in the design of the internet is overseen by large companies that set
the standards used.
(D) The domain name system (DNS) has been challenged by the Digital Millennium
Copyright Act (DMCA).
(D) Nothing will be displayed due to the error index out of bounds.
What will the following code segment display?
(A) 1 4 7 10 9
(B) 10 7 4 1
(C) 9 10 7 4 1
(D) Nothing will be displayed due to the error index out of bounds.
(D) x≤10
Computer Science Principles Final Exam.pdf Computer Science Principles Final Exam //2026