
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
What is a code comment?
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 Wayground
30 questions
ServSafe Manager Chapter 14

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

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

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

Quiz
•
10th - 12th Grade
25 questions
Apparel I 3.03-Construction-Part 1

Quiz
•
9th - 12th Grade
25 questions
Stranger Things Seasons 1 - 4

Quiz
•
9th Grade - University
26 questions
Team Freeze Tag - Unit Test Review

Quiz
•
9th - 12th Grade
30 questions
Understanding Small Basic Programming Concepts

Quiz
•
10th 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 Other
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Exploring Newton's Laws of Motion

Interactive video
•
6th - 10th Grade
20 questions
Cell organelles and functions

Quiz
•
10th Grade
10 questions
Colonial Grievances Against the King Quiz

Quiz
•
10th Grade
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade