JavaScript Basics & Graphics Test

JavaScript Basics & Graphics Test

9th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

CSP CodeHS U8 8.2 & 8.2

CSP CodeHS U8 8.2 & 8.2

11th - 12th Grade

22 Qs

CodeHS APCSP Programming with Python

CodeHS APCSP Programming with Python

11th - 12th Grade

22 Qs

AP CSP Unit 3 Review

AP CSP Unit 3 Review

11th - 12th Grade

22 Qs

FCS Fall Collective review

FCS Fall Collective review

9th - 10th Grade

21 Qs

Basic JavaScript Review

Basic JavaScript Review

9th - 12th Grade

20 Qs

Coding Karel 2

Coding Karel 2

KG - University

20 Qs

CodeHS Data AP CSP

CodeHS Data AP CSP

11th - 12th Grade

22 Qs

APCSP CodeHS Unit 3

APCSP CodeHS Unit 3

11th - 12th 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?