Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf
Computer Science Principles Final Exam
Questions and Revised Correct Answers
What is displayed because of executing the code segment?
(A) 1 3 5 7 9
(B) 1 5 7
(C) 3 9
(D) 9
(C) 3 9
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
(B) Dog Cat Fish
(C) Dog Golden Bandicoot Cat Fish
(D) Golden Bandicoot Cat Fish
pg. 1 https:///computer-science-principles-final-exam-flash-cards/
Page 1 Computer Science Principles Final
Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf
,Page 2 of 24 Computer Science Principles Final
Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf
(D) Golden Bandicoot Cat Fish
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) I and II only
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?
(A) 512
(B) 256
(C) 24
(D) 8
(C) 24
pg. 2 https:///computer-science-principles-final-exam-flash-cards/
Page 2 Computer Science Principles Final
Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf
, Page 3 of 24 Computer Science Principles Final
Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf
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).
(A) All data traveling over the internet is binary.
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) Nothing will be displayed due to the error index out of bounds.
What should replace <missing condition> so that the program below displays True 60%
of the time? [The 9 is a 14]
(A) x<6
(B) x≥6
(C) x>10
(D) x≤10
(D) x≤10
pg. 3 https:///computer-science-principles-final-exam-flash-cards/
Page 3 Computer Science Principles Final
Computer
Exam Questions
Science Principles
and Revised
Final
Correct
ExamAnswers
Questions and Revised Correct Answers.pdf