Karel
Web Design
JS- Graphics
JS-Control Structures
Misc...
100

What is the correct way to write a Karel Command called move?

move();

100

What is the domain of this URL: www.example.com/home.html?

100

Using the words USER and AGE, what is the proper way to use this as a variable name?

userAge

100

How many values doe a boolean statements have, and what are they?

2, True & False.

100

Say you want to write a program to have Karel put down 300 tennis balls, which control structure would you use?

For loop

200
Why do we use functions in programming?

break down code, avoid repeating code, make code more readable.

200

What HTML element names the webpage Tab?

Title

200

A store has 20 apples in its inventory, How can you store this information using a JS variable?

var numApples = 20;

200

What symbol(s) represent the and operator in JS?

&&

200

What is the purpose of using a for loop in code?

To repeat something a fixed number of times.
300

How can we teach a program a new command?

Define a new function

300

What is the name of the HTML element that allows a programmer to utilize a hyperlink?

Anchor element

300

You want to read input from a user, how would you ask the user the number of apples to buy using JS? (use the variable appleToBuy)

var appleToBuy = readInt("How many apples would you like");

300

What symbol(s) represent the or operator in JS?

||

300

How many times will the following program print "hello"?

for (var i = 0; i < 5; i++){

      println("hello");

}

5

400

What is the correct way to define turnRight in Karel?

function turnRight(){

      turnLeft();

      turnLeft();

      turnLeft();

}

400
What HTML tag allows a programmer to insert an image?

Img

400

You are splitting up all your apples between 3 people. How would you use a variable and numbers to calculate the left over apples? (use var leftOver)

var leftOver = numbApples % 3;

400

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

If statement

400

What math symbol allows us to calculate the remainder when using JavaScript? What is its name?

% = modulus

500

In this code, how many times is the "dance" function called and how many times is it defined?

Called 3 times, defined 1

500

Write Valid CSS for the h1 element turing the text a blue color.

h1 {

    color: blue;

}

500

What number would be printed with this code being run?

var num = 13 % 3;

println(num);

1

500

When the following code is ran, what is the value of "isWeekend"?

var isSaturday = true;

var isSunday = false;

var isWeekend = isSaturday || isSunday;

True

500

What day is the final in this class?

Thursday