JavaScript Basics & Graphics Test

JavaScript Basics & Graphics Test

9th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

Karel Quiz

Karel Quiz

8th - 12th Grade

22 Qs

Programming with Karel Quiz

Programming with Karel Quiz

9th - 12th Grade

23 Qs

Super Karel Control Structures

Super Karel Control Structures

6th - 9th Grade

25 Qs

CodeHS JavaScript Control Functions

CodeHS JavaScript Control Functions

9th - 12th Grade

20 Qs

Karel 2.10, 2.11

Karel 2.10, 2.11

6th - 9th Grade

25 Qs

Arrays in Java

Arrays in Java

9th - 12th Grade

20 Qs

CodeHS Computer Science Principles

CodeHS Computer Science Principles

11th - 12th Grade

22 Qs

JavaScript - FR

JavaScript - FR

10th Grade

22 Qs

JavaScript Basics & Graphics Test

JavaScript Basics & Graphics Test

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Tina Mickens

Used 14+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following commands is a valid Karel command?

  1. move

  1. move;

  1. move();

  1. move()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the horizontal pathways called in a Karel world?

  1. rows

  1. points

  1. columns

  1. Karel’s position

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the vertical pathways called in a Karel world?

rows

columns

points

Karel's position

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If Karel starts facing East in the first row, third column, what row and column will Karel be on after this code runs?

move();

move();

move();

turnLeft();

move();


  1. Row 1 and Column 3

  1. Row 4 and Column 4

  1. Row 2 and Column 6

  1. Row 6 and Column 2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

  1. To do something if a condition is true

  1. To make programs run faster

  1. To repeat something a fixed number of times

  1. To do something while a condition is true

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following code, what would be a good Postcondition to write?

/* Precondition: Karel is on a spot with a tennis ball facing East

Postcondition: ... /

function getOnTop() {

turnLeft();

move();

turnRight();

}

  1. Karel is on a spot with a tennis ball facing north

  1. Karel is facing East.

  1. Karel ends one spot above a tennis ball facing East.

  1. Karel is on the same position but on top of a ball.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can we improve the following program?

function main() {

move();

move();

move();

move();

move();

move();

move();

}

main();


  1. Break down this program into more functions

  1. Use a for loop to repeat the move command

  1. Fix the indentation of this program

  1. Use a while loop to repeat the move command

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?