Unit 1
Unit 3
Unit 4
Unit 6
Random
100

Is this a proper command in Karel?

move();

yes

100

Which of the following choices is a properly formed JavaScript variable name, meaning it is both legal in the JavaScript language and considered good style?

user_age

UserAge

userAge

User age

100

What function do you need to call to get the width of the canvas?

getWidth();

100

What symbols represents the and operator in JavaScript?

&&

100

Who was the first president?

Washington

200

Why is this not a proper command in Karel?

moveleft();

The L should be capitalized

200

What is printed to the screen when the following program is run?

let num = 13 % 3;
console.log(num);

1

2

3

4


200

The x-coordinate increases as you move in which direction?

right

200

What kind of statement allows us to run one block of code if one condition is true and a separate block of code otherwise?

if/else statement

200

Who was the 16th president?

Lincoln

300

What is the proper format for a single line comment in Karel?

//followed by a comment

300

What is printed to the screen if the user enters ‘5’ when the following program is run?

let userNum = readInt("Enter your favorite number: ");
let calculatedNum = (userNum * userNum) + userNum;
console.log(calculatedNum);

5

25

20

50

30

300

When creating a new image object, what goes inside of the parentheses?

The image's URL

300

What kind of statement allows us to run a block of code only if a certain condition is true?

if statement

300

What state has the highest population?

California

400

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();
}

ballsPresent()

400

True or False: The following returns a random decimal number between 1 and 10?

Randomizer.nextFloat(1,10);

             

true

400

Which line of code is the correct way to add a line to the canvas?

  • let ln = new line(100, 50, 300, 200);

  • let ln = new Line(100, 50, 300, 200);

  • let ln = line(100, 50, 300, 200);

  • let ln = Line(100, 50, 300, 200);

let ln = new Line(100, 50, 300, 200);

400

Which of these is not valid for a boolean?

true

false

yes

yes

400

What is the tallest mountain in the world?

Mt. Everest

500

How can we teach Karel new commands?

Define a new _________.

Define a new function

500

What type of data can we NOT randomly generate using the Randomizer?                          

Colors

Integers

Floats

Boolean

Strings

Strings

500

How many coordinates does the Line object need?

4

500

In a graphics canvas, what are the coordinates of the center of the canvas?

getWidth() / 2, getHeight() / 2

500

What is the chemical symbol for Oxygen?

O