A student wants to determine whether a certain problem is undecidable. Which of the following will demonstrate that the problem is undecidable?
AP CSP MCQ Review Session 3 Quiz

Quiz
•
Computers
•
10th Grade
•
Medium
Thomas Harris
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Show that for one instance of the problem, an algorithm can be written that is always capable of providing a correct yes-or-no answer.
Show that for one instance of the problem, no algorithm can be written that is capable of providing a correct yes-or-no answer.
Show that for one instance of the problem, a heuristic is needed to write an algorithm that is capable of providing a correct yes-or-no answer.
Show that for one instance of the problem, an algorithm that runs in unreasonable time can be written that is capable of providing a correct yes-or-no answer.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedure. PROCEDURE doSomething(num1, num2) { DISPLAY(num1) RETURN(num1) DISPLAY(num2) } Consider the following statement. DISPLAY(doSomething(10, 20)) What is displayed as a result of executing the statement above?
A. 10 10
B. 10 20
C. 10 10 20
D. 10 20 10
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student wrote the procedure above to calculate the sum of the integers from 1 to 5. The student later decides to modify the procedure to calculate the sum of the integers from 1 to max, which represents any positive integer greater than 1. Which of the following changes should be made to the procedure to meet the student’s goal?
I only
II only
I and II
I and III
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student is developing a program that allows users to look up the definitions of words that appear in a book. The student plans to perform a large number of searches through a dictionary containing words and their definitions. The student will use a procedure written by a computer scientist to quickly search the dictionary (and knows that the procedure will return a definition if one is available). The student cannot modify the search procedure written by the computer scientist but can call the procedure by supplying a word. Which of the following is a true statement about the student’s use of the computer scientist’s search procedure?
The student is changing the search procedure’s internal abstractions.
The student is modifying the search procedure to take a definition as an argument and return the corresponding word.
The student is reusing the computer scientist’s procedural abstraction by knowing what the procedure does without knowing how it does it.
The student is reusing the computer scientist’s procedural abstraction by using duplicate code each time a search needs to occur.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student is writing a program that is intended to replace each negative value in a particular column of a spreadsheet with the value 0. Which of the following procedures is most likely to be useful in the student’s program?
A procedure containsNegatives, which returns true if any negative values appear in the column and returns false otherwise.
A procedure countNegatives, which returns the number of negative values that appear in the column.
A procedure findNegative, which returns the row number of the first negative value that appears in the column or -1 if there are no negative values.
A procedure minimum, which returns the minimum value that appears in the column.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A spinner contains 12 regions of equal size. The regions are numbered 1 to 12. Which of the following code segments can be used to simulate the results of spinning the spinner three times and assigns the sum of the values obtained by the three spins to the variable sum?
sum ← RANDOM(1, 12) + RANDOM(1, 12) + RANDOM(1, 12)
sum ← RANDOM(1, 36)
sum ← 3 * RANDOM(1, 12)
sum ← 12 * RANDOM(1, 3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The code segment above can be used to simulate the bonus round. Which of the following is NOT a possible output of this simulation?
The player had 1 bonus round attempts and 1 of them earned extra points.
The player had 2 bonus round attempts and 0 of them earned extra points.
The player had 3 bonus round attempts and 7 of them earned extra points.
The player had 4 bonus round attempts and 3 of them earned extra points.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
GCSE Computer Science 9-1: Sorting Algorithms

Quiz
•
10th Grade - University
10 questions
algortihm cs

Quiz
•
10th Grade
10 questions
Introduction to programming

Quiz
•
5th - 10th Grade
15 questions
APCSP Semester 1 Review

Quiz
•
10th Grade
8 questions
APCSP Big Idea 3 Review

Quiz
•
10th - 12th Grade
16 questions
Coding review

Quiz
•
7th - 12th Grade
9 questions
2.1.2 CSE Coding Fundamentals: Dead Reckoning

Quiz
•
9th - 12th Grade
15 questions
AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

Quiz
•
10th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University