What is provided to students during the AP Computer Science Principles exam to help them understand the code?

Code Segments and Logic Problems

Interactive Video
•
Computers, Education
•
10th - 12th Grade
•
Medium

Emma Peterson
Used 6+ times
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programming language guide
An exam reference sheet
A calculator
A textbook
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code segments correctly assigns a letter grade based on a numeric score?
if score > 90 then grade = 'A' else grade = 'B'
if score > 90 then grade = 'A' else if score >= 80 then grade = 'B' else grade = 'C'
if score >= 80 then grade = 'B' else if score > 90 then grade = 'A' else grade = 'C'
if score < 80 then grade = 'C' else if score <= 90 then grade = 'B' else grade = 'A'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be displayed if the parameter x is negative in the given procedure?
Nothing
False
Error
True
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the code segment determine if a list contains duplicate values?
By comparing each element to the element that immediately follows
By comparing each element to the element that immediately precedes
By comparing each element to all subsequent elements in the list
By comparing each element to all other elements in the list
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For which values of num correct does the code segment not display the intended grade?
8 and 6
7 and 6
9 and 7
9 and 8
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What change should be made to the code segment to ensure it reduces the score by penalty correctly?
Change line 1 to if score < 0
Change line 1 to if score + penalty > 0
Interchange lines 3 and 7
Change line 1 to if score + penalty < 0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of r after executing the given code segment?
20
30
40
10
Create a free account and access millions of resources
Popular Resources on Quizizz
20 questions
math review

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions

Interactive video
•
6th - 8th Grade
19 questions
Math Review

Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review

Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade
20 questions
Insurance

Quiz
•
9th - 12th Grade
20 questions
MCAS Biology Review

Quiz
•
9th - 10th Grade
20 questions
Paying for College

Quiz
•
9th - 12th Grade
20 questions
Banking

Quiz
•
9th - 12th Grade
20 questions
Managing Credit

Quiz
•
9th - 12th Grade