Programming with Karel Final

Programming with Karel Final

Assessment

Quiz

Computers

7th - 8th Grade

Hard

Created by

Travante James

Used 4+ times

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following commands is a valid Karel command?

takeBall

PutBall;

takeBall();

takeBall()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What makes the following command an invalid Karel command?


turnright();

It should end in a colon rather than a semicolon

The r should be a capital R

It should start with a capital T

This command is correct

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to define a moveTwice function in Karel?

function moveTwice() {

turnLeft();

turnLeft();

turnLeft();

}

function moveTwice() {

move();

move();

}

function turnRight() {

turnLeft();

turnLeft();

turnLeft();

}

moveTwice function() {

move();

move();

}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use functions in Karel programs?

Break down our program into more codes to write

Avoid repeating code

Make our program longer and more complicated

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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


function start() {

move();

jump();

move();

move();

jump();

jump();

move();

}


function jump() {

turnLeft();

move();

turnLeft();

turnLeft();

turnLeft();

move();

turnLeft();

turnLeft();

turnLeft();

move();

turnLeft();

}

Called 2 times, defined 1 time

Called 1 time, defined 3 times

Called 4 times, defined 1 time

Called 3 times, defined 1 times

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What’s wrong with this code?


function start() {

move();

slide();

slide();

}


function slide() {

move();

move();

move();

}


function slide() {

move();

move();

move();

}

The slide function is defined twice

The slide function has a syntax error

The slide function has been defined twice

slide is not a command that Karel understands

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many total times will Karel put a ball in this program?


function start() {

move();

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

move();

putBall();

}

}

1

5

2

7

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?

Discover more resources for Computers