AP CSP - 2

Quiz
•
Computers
•
9th Grade
•
Hard
+11
Standards-aligned
Isha Horton
Used 1+ times
FREE Resource
29 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following best explains the ability to solve problems algorithmically?
Any problem can be solved algorithmically, though some algorithmic solutions may require humans to validate the results.
Any problem can be solved algorithmically, though some algorithmic solutions must be executed on multiple devices in parallel.
Any problem can be solved algorithmically, though some algorithmic solutions require a very large amount of data storage to execute.
There exist some problems that cannot be solved algorithmically using any computer.
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
For which of the following situations would it be best to use a heuristic in order to find a solution that runs in a reasonable amount of time?
Appending a value to a list of n elements, which requires no list elements be examined.
Finding the fastest route that visits every location among n locations, which requires n! possible routes be examined.
Performing a binary search for a score in a sorted list of n scores, which requires that fewer than n scores be examined.
Performing a linear search for a name in an unsorted database of n people, which requires that up to n entries be examined.
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the three algorithms will identify the correct people?
I only
II only
I and II
II and III
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following algorithms displays the correct distance for all possible values of num1 and num2 ?
Step 1:
Add num1 and num2 and store the result in the variable sum.
Step 2: Take the absolute value of sum and display the result.
Step 1:
Subtract num1 from num2 and store the result in the variable diff.
Step 2:
Take the absolute value of diff and display the result.
Step 1:
Take the absolute value of num1 and store it in the variable absNum1.
Step 2:
Take the absolute value of num2 and store it in the variable absNum2.
Step 3:
Add absNum1 and absNum2 and display the result.
Step 1:
Take the absolute value of num1 and store it in the variable absNum1.
Step 2:
Take the absolute value of num2 and store it in the variable absNum2.
Step 3:
Subtract absNum1 from absNum2 and display the result.
Tags
CCSS.7.NS.A.1C
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A certain game keeps track of the maximum and minimum scores obtained so far. If num represents the most recent score obtained, which of the following algorithms correctly updates the values of the maximum and the minimum?
If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.
If num is less than the minimum, set the minimum equal to num. Otherwise, if num is greater than the maximum, set the maximum equal to num.
If num is less than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.
If num is greater than the minimum, set the minimum equal to num. Otherwise, if num is less than the maximum, set the maximum equal to num.
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?
If the first number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.
If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them.
If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the last number, swap them.
If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.
Tags
CCSS.6.NS.C.7A
CCSS.6.NS.C.7B
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following statements is equivalent to the algorithm in the flowchart?
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Lesson 4_Advanced Motion Tweening

Quiz
•
9th - 12th Grade
27 questions
OCR Computer Science - Networks

Quiz
•
8th - 10th Grade
30 questions
Computer Science GCSE Revision Paper 2

Quiz
•
9th - 10th Grade
28 questions
J277 Revision Quiz (Component 1)

Quiz
•
9th - 11th Grade
25 questions
PTS X IPS-2

Quiz
•
9th - 12th Grade
26 questions
Section 2: CodeHS - Programming with Javascript

Quiz
•
9th - 12th Grade
25 questions
Year 8 Computational Thinking and Python

Quiz
•
8th - 9th Grade
25 questions
Electronic Components

Quiz
•
9th - 12th 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
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade