
unit 3-4 ap comp sci

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Jocelyn Mathew
Used 3+ times
FREE Resource
Student preview

35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer wants to determine whether a score is within 10 points of a given target. For example, if the target is 50, then the scores 40, 44, 50, 58, and 60 are all within 10 points of the target, while 38 and 61 are not.Which of the following Boolean expressions will evaluate to true if and only if score is within 10 points of target ?
(score ≤ target + 10) AND (target + 10 ≤ score)
(target + 10 ≤ score) AND (score ≤ target - 10)
(score ≤ target - 10) AND (score ≤ target + 10)
(target - 10 ≤ score) AND (score ≤ target + 10)
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are benefits of using well-named variables in a computer program?
The program will run faster.
The program will be easier for people to read.
The program will have a greater data storage capacity.
The program will be easier to modify in the future.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student is writing a program to model different real-world events using simulations. Which of the following simulations will generate a result that would best be stored using a Boolean variable?
A simulation of flipping a fair coin
A simulation of rolling a fair die (with sides numbered 1 through 6)
A simulation of the temperature in a location over time
A simulation of traffic patterns on a road
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
The following spinner is used in a game. The region labeled "blue" represents of the spinner. The regions labeled "orange" and "purple" are equal in size.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following procedure is intended to return true if at least two of the three parameters are equal in value and is intended to return false otherwise.
For which of the following procedure calls does the procedure NOT return the intended value?
AnyPairs ("bat", "cat", "rat")
AnyPairs ("bat", "bat", "rat")
AnyPairs ("bat", "cat", "bat")
AnyPairs ("bat", "cat", "cat")
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following spinner, which is used to determine how pieces are to be moved on a game board. The region labeled "Move 1 space" is six times as large as each of the other two regions Which of the following code segments can be used to simulate the behavior of the spinner?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a certain science experiment, percent of trials are expected to be successful and percent of trials are expected to be unsuccessful. The program below is intended to simulate the results of repeated trials of the experiment. Which of the following can be used to replace so that the simulation works as intended?
Create a free account and access millions of resources
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade