Cybersecurity: Programming Fundamentals

Cybersecurity: Programming Fundamentals

9th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

ULANGAN HARIAN DASAR - DASAR DESAIN GRAFIS

ULANGAN HARIAN DASAR - DASAR DESAIN GRAFIS

10th Grade

20 Qs

Software

Software

10th Grade

20 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

HTML

HTML

11th Grade

25 Qs

quiz_G10

quiz_G10

12th Grade

20 Qs

KELAS DKV 1 PTS PLD SEMESTER 2

KELAS DKV 1 PTS PLD SEMESTER 2

11th Grade

20 Qs

Latihan TDJKT-XTDJKT2

Latihan TDJKT-XTDJKT2

10th Grade

20 Qs

Cybersecurity: Programming Fundamentals

Cybersecurity: Programming Fundamentals

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Clayton Chaffin

Used 20+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can we improve the following program?

function start() {

          move();

          move();

          move();

          move();

          move();

          move();

          move();

          move();

          move();

}

Break down this program into more functions

Use a for loop to repeat the move command

Use a while loop to repeat the move command

Fix the indentation of this program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword do you need to use to define a variable in JavaScript?

variable

var

const

x

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed as a result of the following code segment?

var firstPlace = "Dylan";

var secondPlace = "Jacob";

firstPlace = "Jacob";

secondPlace = "Julia";

println(firstPlace);

println(secondPlace);

Dylan/Jacob

Jacob/ Dylan

Jacob/ Julia

Julia/ Jacob

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a valid Karel command?

move;

MOVE

move();

move()

5.

MULTIPLE CHOICE 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

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which general while loop definition is written correctly?

A

while (x is true) {

       // code

}

B

if (i<5) {

     //code

}

C

while (var i = 0; i < count; i++) {

      //code

}

D

while (condition) {

      //code

}

A

B

C

D

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does an if/else statement look like in JavaScript?

A

if (condition) {

      //code

}

B

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

     //code

C

if (condition) {

     //code }

if (condition) {

      //code

}

D

if (condition) {

      //code

} else {

       //code

}

A

B

C

D

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?