AP CSP Standard 1 Review

Quiz
•
Computers
•
12th Grade
•
Medium
Kelly Challand
Used 8+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid condition to go in an if statement for Karel?
ballsPresent()
frontIsClear()
leftIsBlocked()
putBall()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Karel is on a location with one tennis ball. After the following code runs, how many tennis balls will there be at that location?
for (var i = 0; i < 3; i++) {
if (ballsPresent()) {
takeBall();
} else {
putBall();
putBall();
}
}
0
1
2
6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Karel starts at Street 2, Avenue 1, facing East in a 5x5 world. What will happen after this code runs?
move();
putBall();
move();
move();
move();
move();
move()
Karel will end on Street 1, Avenue 2
Karel will end on Street 1, Avenue 7
This code won’t run because of a syntax error
Karel will crash into a wall
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition should be used in this while loop to get Karel to pick up all the tennis balls on the current location?
while (________) {
takeBall();
noBallsPresent()
ballsPresent()
frontIsClear()
takeBall()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why does a programmer indent their code?
Easier for other people to understand.
A key part of good programming style!
Helps show the structure of the code.
All of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can we teach Karel new commands?
Define a new function
While loop
For loop
The Start function
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to write a program to have Karel put down 300 tennis balls. Which control structure would you use?
Nested while loop
For loop
While loop
If Statement
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Computer Programming in Python Review

Quiz
•
9th - 12th Grade
22 questions
CodeHS AP CSP Unit 3 Review

Quiz
•
11th - 12th Grade
22 questions
BJC Unit 1 Practice Quizizz

Quiz
•
9th - 12th Grade
25 questions
Code HS 3.19 Intro to Programming w/Karel

Quiz
•
9th - 12th Grade
22 questions
Karel Quiz

Quiz
•
8th - 12th Grade
25 questions
CodeHS Javascript Unit 1 Quiz Review

Quiz
•
9th - 12th Grade
25 questions
JavaScript Karel Unit 1 Quiz Study Guide

Quiz
•
9th - 12th Grade
23 questions
Unit 1 CodeHS Review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade