Unit 3 Exam | CodeHS

Unit 3 Exam | CodeHS

10th Grade

26 Qs

quiz-placeholder

Similar activities

Minecraft

Minecraft

1st Grade - Professional Development

26 Qs

Cyber Robotics 101 Sessions 1-7

Cyber Robotics 101 Sessions 1-7

8th - 12th Grade

25 Qs

Revision Quiz

Revision Quiz

10th Grade

22 Qs

Karel Commands Quiz

Karel Commands Quiz

10th Grade

22 Qs

Memory I

Memory I

9th - 10th Grade

21 Qs

micro:bit Writing Programs

micro:bit Writing Programs

9th - 12th Grade

25 Qs

The Coming Apocalypse Test (Coding I Chapter 7 SG)

The Coming Apocalypse Test (Coding I Chapter 7 SG)

9th - 12th Grade

25 Qs

Robotics Test Review

Robotics Test Review

8th - 12th Grade

24 Qs

Unit 3 Exam | CodeHS

Unit 3 Exam | CodeHS

Assessment

Quiz

Other

10th Grade

Medium

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?