
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
12 questions
Code.org Unit 6 Assessment Day

Flashcard
•
9th - 12th Grade
6 questions
Common Accounting Errors

Flashcard
•
KG - University
10 questions
REVISION; SENTENCE COMPLETION, USAGE 1 & MAIN IDEA

Flashcard
•
10th - 11th Grade
8 questions
Percent Error

Flashcard
•
10th - 12th Grade
8 questions
Python Casting & Data Types

Flashcard
•
9th - 12th Grade
9 questions
AP CSP List Review

Flashcard
•
9th - 12th Grade
13 questions
Unit 5 Flashcard AP CSP

Flashcard
•
9th - 12th Grade
6 questions
Solving Multistep Equations and Inequalities

Flashcard
•
9th - 11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade