AP CS A Unit 3

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Abigail Sheridan
Used 16+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code, assuming grade is an int:
Which of the following will always produce the same result as the code above, regardless of the value of grade? (multiple correct answers)
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is output by the following code?
11
15
31
error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following incomplete code segment.
Consider the following potential replacements for /* missing code */ . Which of these replacements will cause
the code segment to always print false ? Assume that Math is imported correctly into our program.
(int)(Math.random() * 10) + 20
(int)(Math.random() * 10) + 25
(int)(Math.random() * 10) + 30
(int)(Math.random() + 30)
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the variables, which boolean condition is true?
int a = 10;
int b = 10;
a < b && a == b
a < b && a != b
a > b || a != b
b >= a && a >= b
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following if statement tests the snowfall in Alaska during the months of December, January and February.
Assume low represents a threshold determined to be the least amount of snow required to be normal and high
represents a threshold determined to be the most amount of snow required to be normal and snow represents the
amount of snow in inches for that month. All variables are doubles. It could be replaced with:
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following truth table matches which boolean condition?
A && ( A || B )
!A && ( A || !B )
A && ( A && B )
A || ( A || B )
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
A weather app records the current temperature to the nearest degree Fahrenheit using an int variable temp.
The app also uses a String variable tempAdj to store an adjective based on the value of temp which will be used
in a short written summary of the current weather. The values of tempAdj are determined as follows:
Which of the following code segments will correctly set the value of tempAdj for any given value of temp? (Multiple correct answers)
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
C++

Quiz
•
11th Grade
20 questions
Very Basic Programming

Quiz
•
10th - 12th Grade
16 questions
For and While Loops in Python

Quiz
•
9th - 12th Grade
20 questions
Java Conditional Constructs

Quiz
•
9th - 10th Grade
15 questions
JavaScript and Graphics

Quiz
•
9th - 12th Grade
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
15 questions
Python Revision Tour - I

Quiz
•
12th Grade
18 questions
Test 4 Edhesive Review

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
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade