
AP CS Principles Algorithms & Programming

Flashcard
•
Computers
•
9th Grade - University
•
Hard
Wayground Content
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
CODEHS Looping Unit 5 Review

Flashcard
•
9th - 12th Grade
9 questions
Unit 4 Lesson 1 While Loops

Flashcard
•
9th - 12th Grade
10 questions
PYTHON -- variables

Flashcard
•
9th - 12th Grade
9 questions
Sp3 expresate 3 Ch 3.2 test review - vocabulary/reading

Flashcard
•
9th - 12th Grade
10 questions
Advanced Formulas Knowledge Assessment

Flashcard
•
9th - 12th Grade
11 questions
AP Computer Science Principles Unit 3

Flashcard
•
10th - 12th Grade
6 questions
Programming Concepts and Errors

Flashcard
•
9th - 12th Grade
5 questions
Lists and Loops Review-Code.org

Flashcard
•
10th Grade - University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade