
AP comp sci test #7
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Sophie Schneider
Used 1+ times
FREE Resource
Enhance your content in a minute
109 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
The following table shows the value of expression based on the values of input1 and input2. Which of the following expressions are equivalent to the value of expression as shown in the table?
(NOT input1) OR (NOT input2)
(NOT input1) AND (NOT input2)
NOT (input1 OR input2)
NOT (input1 AND input2)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing toward the top of the grid. Which of the following code segments will move the robot to the gray square along the path indicated by the
arrows?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student’s overall course grade in a certain class is based on the student’s scores on individual assignments. The course
grade is calculated by dropping the student’s lowest individual assignment score and averaging the remaining scores.
For example, if a particular student has individual assignment scores of 85, 75, 90, and 95, the lowest score (75) is
dropped. The calculated course grade is . A programmer is writing a program to calculate a student’s course grade using the process described. The
programmer has the following procedures available. The student’s individual assignment scores are stored in the list scores. Which of the following can be used to calculate a student’s course grade and store the result in the variable finalGrade?
finalGrade <--- Sum (scores) / LENGTH (scores)
finalGrade <--- finalGrade - Min (scores)
finalGrade <--- Sum (scores) / (LENGTH (scores) - 1)
finalGrade <--- finalGrade - Min (scores)
finalGrade <--- Sum (scores) - Min (scores)
finalGrade <--- finalGrade / LENGTH (scores)
finalGrade <--- Sum (scores) - Min (scores)
finalGrade <--- finalGrade / (LENGTH (scores) - 1)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right. Consider the procedures below. Which of the following code segments will move the robot to the gray square?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Grades in a computer science course are based on total points earned on a midterm exam and a final exam. The teacher provides a way for students to improve their course grades if they receive high scores on the final exam: if a student’s final exam score is greater than the student’s midterm exam score, the final exam score replaces the midterm exam score in the calculation of total points. The table below shows two students’ scores on the midterm and final exams and the calculated total points each student earns.
• Khalil does better on the midterm exam than on the final exam, so his original midterm and final exam scores are added to compute his total points.
• Josefina does better on the final exam than on the midterm exam, so her final exam score replaces her midterm exam score in the total points calculation.
A programmer is writing a procedure to calculate a student’s final grade in the course using the score replacement policy described. The student’s exam scores are stored in the variables and . The procedure returns the larger of and . Which of the following could be used in the procedure to calculate a student’s total points earned in the course and store the result in the variable ?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following code segment is intended to draw the figure.
startX <--- 2
startY <--- 6
endX <--- 8
endY <--- 8
REPEAT 4 TIMES
{
<MISSING CODE>
Which of the following can be used to replace <MISSING CODE> so that the figure is drawn correctly?
DrawLine (startX, startY, endX, endY)
endY <--- endY - 2
DrawLine (startX, startY, endX, endY)
endX <--- endX - 2
endY <--- endY - 2
endY <--- endY - 2
DrawLine (startX, startY, endX, endY)
endX <--- endX - 2
endY <--- endY - 2
DrawLine (startX, startY, endX, endY)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value.
The following procedure is intended to return true if numberList is increasing and return false
otherwise. Assume that numberList contains at least two elements.
Line 1: PROCEDURE isIncreasing(numberList)
Line 2: {
Line 3: count 2
Line 4: REPEAT UNTIL(count > LENGTH(numberList))
Line 5: {
Line 6: IF(numberList[count] < numberList[count - 1])
Line 7: {
Line 8: RETURN(true)
Line 9: }
Line 10: count count + 1
Line 11: }
Line 12: RETURN(false)
Line 13: }
Which of the following changes is needed for the program to work as intended?
In line 3, 2 should be changed to 1.
In line 6, < should be changed to ≥.
Lines 8 and 12 should be interchanged.
Lines 10 and 11 should be interchanged.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
104 questions
3°Trim. 3°Sec. 2023 - 2024
Quiz
•
9th Grade
111 questions
tin 11
Quiz
•
11th Grade
109 questions
Ôn Tập Kiểm Tra Giữa Kỳ 2
Quiz
•
11th Grade
110 questions
PLTW CSE Unit 3.1/3.2 Review (Python)
Quiz
•
9th - 12th Grade
104 questions
REMIDI XI DKV 3
Quiz
•
11th Grade
114 questions
Тест по программированию на C++
Quiz
•
12th Grade
105 questions
Sinh Giữa Kì 11
Quiz
•
11th Grade
104 questions
Kiến thức về máy tính
Quiz
•
12th Grade
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade
85 questions
Word Processing Review
Quiz
•
8th - 9th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
39 questions
UNIT 7 and UNIT 8 — Multiple Choice Question Bank (Extracted)
Quiz
•
9th Grade
31 questions
Python Conditionals Review
Quiz
•
9th - 12th Grade
