Search Header Logo

Semester Exam Review

Authored by Alicia Alanis

Computers

12th Grade

Used 7+ times

Semester Exam Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A store has 20 apples in its inventory. How can you store this information in a JavaScript variable?

let numApples == 20;

20 numApples;

let numApples = 20;

let applesToBuy

2.

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

3.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

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

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you were given the following variables:

let distance = 2;

let time = 30;

What line of code would print the speed in km/hr if the distance is given in km and the time is given in minutes? (Speed = distance / time)

console.log(distance / (time / 60));

console.log(distance / time);

console.log(distance * (time / 60));

console.log(distance * time);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol do you use to do multiplication in JavaScript?

x

X

*

#

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print to the screen?

console.log(2 + 2);

2 + 2

2

4

22

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following returns a random decimal number between 1 and 10?

randomFloat(1, 10);

randFloat(1, 10);

Randomizer.float(1, 10);

Randomizer.nextFloat(1, 10);

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?