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

What state is the largest (in size)

Alaska

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

What is the capital of Texas?

Austin

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 is the largest ocean?

Pacific

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 chemical symbol for Hydrogen?

H

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

Name one of the three founders of Apple Computer company.

Steve Jobs

Steve Wozniak

Ronald Wayne

M
e
n
u