AP Computer Science Principles Session 2 – MCQ

Quiz
•
Computers
•
10th Grade
•
Hard
Thomas Harris
Used 1+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a true statement about program documentation?
A. Program documentation should not be changed after it is first written.
B. Program documentation is only needed for programs in development; it is not needed after a program is completed.
C. Program documentation is useful when programmers collaborate but not when a programmer works individually on a project.
D. Program documentation is useful during initial program development and also when modifications are made to existing programs.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be displayed if targetName is not found in nameList?
An error message will be displayed
A default value will be shown
Nothing will be displayed
The program will crash
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following procedure calls can be used to demonstrate that the procedure does NOT work as intended?
FindName ([“Andrea”, “Ben”], “Ben”)
FindName ([“Andrea”, “Ben”], “Diane”)
FindName ([“Andrea”, “Ben”, “Chris”], “Ben”)
FindName ([“Andrea”, “Ben”, “Chris”], “Ben”)
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
A programmer wrote the program below. The program uses a list of numbers called numList. The program is intended to display the sum of the numbers in the list. In order to test the program, the programmer initializes numList to [0, 1, 4, 5]. The program displays 10, and the programmer concludes that the program works as intended. Which of the following is true?
The conclusion is correct; the program works as intended.
The conclusion is incorrect; the program does not display the correct value for the test case [0, 1, 4, 5].
The conclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct.
The conclusion is incorrect; using the test case [0, 1, 4, 5] only confirms that the program works for lists in increasing order.
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
In a certain district, 20 percent of the voters are expected to vote for Candidate A in an election. The computer program below is intended to simulate the result of the election with n voters, and display the number of votes received by Candidate A.
Line 1: sum ← 0
Line 2: REPEAT n TIMES
Line 3: {
Line 4: IF (
A. RANDOM(1, 5) = 1
B. RANDOM(1, 5) ≤ 2
C. RANDOM(1, 10) = 2
D. RANDOM(1, 10) ≤ 2
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A new bank plans to make customer convenience a priority by minimizing the amount of time a customer waits in line. The bank is considering two options: a single line where the customer at the front waits for the next available teller, or separate lines for each teller. The bank decides to use a computer simulation of these two options to determine the average wait time for customers. Which of the following is NOT true about the bank’s plan?
A. The bank can incorporate other factors, such as the number of tellers, in the simulation.
B. The bank can use the simulation to investigate these two options without causing inconvenience for customers.
C. The bank may consider new alternatives based on the simulation results.
D. The simulation will not produce usable results because actual customer data are not available.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The programmer wants to reduce the number of operations that are performed when the program is run. Which change will result in a correct program with a reduced number of operations performed?
A. Interchanging line 1 and line 2
B. Interchanging line 5 and line 6
C. Interchanging line 6 and line 7
D. Interchanging line 7 and line 8
8.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following statements is true?
Every problem can be solved with an algorithm for all possible inputs, in a reasonable amount of time, using a modern computer.
Every problem can be solved with an algorithm for all possible inputs, but some will take more than 100 years, even with the fastest possible computer.
Every problem can be solved with an algorithm for all possible inputs, but some of these algorithms have not been discovered yet.
There exist problems that no algorithm will ever be able to solve for all possible inputs.
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled player has a turn, the game runs slowly because the computer evaluates all potential moves and selects the best one. Which of the following best describes the possibility of improving the running speed of the game?
The game’s running speed can only be improved if the game is played between two human players instead of with the computer-controlled player.
The game’s running speed might be improved by using a process that finds approximate solutions every time the computer-controlled player has a turn.
The game’s running speed cannot be improved because computers can only be programmed to find the best possible solution.
The game’s running speed cannot be improved because the game is an example of an algorithm that does not run in a reasonable time.
Similar Resources on Wayground
10 questions
SST Yr8 Term 1 HW/SW Keywords

Quiz
•
8th - 10th Grade
12 questions
CSP: Code.org - Unit 3 Vocabulary Review

Quiz
•
9th - 12th Grade
14 questions
Security Systems - Threats

Quiz
•
10th Grade
8 questions
Code.org Unit 3 Review

Quiz
•
9th - 12th Grade
9 questions
Software - Functions of the Operating System

Quiz
•
5th - 12th Grade
10 questions
Von Neumann Architecture

Quiz
•
8th Grade - University
11 questions
OCR J277 2.5 Characteristics and purpose of languages

Quiz
•
9th - 12th Grade
12 questions
GCSE AQA 04 Computer Systems - Languages & Translators

Quiz
•
10th - 11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade