What is a code comment?

Unit 3 Exam | CodeHS

Quiz
•
Other
•
10th Grade
•
Medium

Alicia Alanis
Used 26+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A way to teach Karel a new word
A way to give notes to the reader to explain what your code is doing
A message to your teacher in code
A place to write whatever you want in your code
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we use if statements in JavaScript?
To break out of some block of code
To do something only if a condition is true
To do something while a condition is true
To repeat something for a fixed number of times
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we use if/else statements in JavaScript?
To repeat something for a fixed number of times
To either do something if a condition is true or do something else
To break out of some block of code
To repeat something while a condition is true
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Why do we use while loops in JavaScript?
To break out of some block of code
To do something if a condition is true
To repeat some code while a condition is true
To repeat something for a fixed number of times
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a runtime error?
Karel crashing into a wall
A command missing a semicolon
An if/else statement missing a set of parentheses
A function definition missing a closing curly bracket
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following program is supposed to put down three tennis balls. Where is the logic error?
function main() {
placeThreeBalls();
}
function placeThreeBalls() {
for (let i = 0; i <= 3; i++) {
putBall();
}
}
main();
line 2
line 3
line 5
line 8
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a syntax error?
Karel tries to pick up a ball, but there is no ball to pick up.
A for loop uses commas instead of semicolons.
When run, the program does not match the result world.
Karel crashes into a wall.
Create a free account and access millions of resources
Similar Resources on Quizizz
25 questions
Apparel I 3.03-Construction-Part 1

Quiz
•
9th - 12th Grade
30 questions
Forensic Science Final Exam

Quiz
•
10th - 12th Grade
25 questions
Quiz-1

Quiz
•
10th Grade
28 questions
Maps Vocab and Map Reading Test Practice

Quiz
•
9th - 12th Grade
26 questions
Apparel I-3.03

Quiz
•
9th - 12th Grade
25 questions
Arduino BOE Bot MS

Quiz
•
9th - 12th Grade
24 questions
PDM EOC

Quiz
•
9th - 12th Grade
25 questions
Engineering Technology Review A

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Other
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
65 questions
MegaQuiz v2 2025

Quiz
•
9th - 12th Grade
10 questions
GPA Lesson

Lesson
•
9th - 12th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade