
AP CS Principles Algorithms & Programming
Flashcard
•
Computers
•
9th Grade - University
•
Practice Problem
•
Hard
Wayground Content
Used 1+ times
FREE Resource
Student preview

8 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the result of the following AP pseudocode? You may assume that the isPrime procedure accepts a whole number and returns Boolean true if the number is prime and Boolean false if the number is composite.
n ← 0
primes ← []
REPEAT UNTIL(n > 100)
{
IF(isPrime(n))
{
APPEND(primes, n)
}
n ← n + 1
Back
The primes list contains all of the prime numbers from 0 to 100.
2.
FLASHCARD QUESTION
Front
What does the following AP pseudocode procedure do?
PROCEDURE mystery(num)
{
IF(num MOD 2 = 0)
{
RETURN(true)
}
ELSE
{
RETURN(false)
}
}
Back
Returns true if the num argument is an even number; returns false otherwise.
3.
FLASHCARD QUESTION
Front
Smyth County Public Schools' Director of Transportation is trying to figure out bus routes for the coming school year. He wants to minimize miles traveled, while still picking up all students who request bus transport. What kind of solution is he likely to use?
Back
A heuristic approach that comes up with a reasonable set of routes that is not necessarily the most optimal solution.
4.
FLASHCARD QUESTION
Front
True or False: there are certain problems that cannot be solved algorithmically.
Back
True
5.
FLASHCARD QUESTION
Front
When measuring the efficiency of an algorithm, is the growth rate of the number of moves required to solve the Towers of Hanoi problem (which grows exponentially) considered reasonable or unreasonable?
Back
Unreasonable
6.
FLASHCARD QUESTION
Front
What kind of coding error occurs if a program using Zeller's Congruence incorrectly determines that Feb. 29, 2021 fell on a Monday? Options: Syntactical error, Run-time error, Logic error, Overflow error
Back
Logic error
7.
FLASHCARD QUESTION
Front
A problem for which no algorithm can be constructed that will provide a correct answer for every set of inputs is called:
Back
An undecidable problem
8.
FLASHCARD QUESTION
Front
What is the output of this circuit which is composed of two logic gates?
Back
True
Similar Resources on Wayground
10 questions
Review - Proving Congruent Triangles
Flashcard
•
KG - University
10 questions
UH Firewall n Bandwidth
Flashcard
•
12th Grade
15 questions
Linear Relationships
Flashcard
•
9th - 12th Grade
7 questions
Health & Safety at Work
Flashcard
•
11th Grade
12 questions
Gold Advanced Unit 8 page 82
Flashcard
•
8th - 12th Grade
5 questions
Introduction to Software Engineering
Flashcard
•
KG
7 questions
Types of Motion
Flashcard
•
9th - 12th Grade
5 questions
Types of Impact Failures
Flashcard
•
KG - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade