Karel CodeHS Function

Karel CodeHS Function

9th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

Editing Video

Editing Video

KG - 12th Grade

20 Qs

Kiểm tra kiến thức về phần mềm chỉnh sửa ảnh và làm phim

Kiểm tra kiến thức về phần mềm chỉnh sửa ảnh và làm phim

11th Grade

20 Qs

Video Editing Exam

Video Editing Exam

9th Grade

20 Qs

Grade 10 4th Quarter Review Quiz

Grade 10 4th Quarter Review Quiz

10th Grade

20 Qs

EmTech STEM 11A

EmTech STEM 11A

11th Grade

20 Qs

Primary storage

Primary storage

9th - 11th Grade

20 Qs

Year 7 Reading algorithms

Year 7 Reading algorithms

8th - 9th Grade

20 Qs

How Computers Work Review

How Computers Work Review

6th - 12th Grade

27 Qs

Karel CodeHS Function

Karel CodeHS Function

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Thomas Martinez

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

Which of the following commands is a valid Karel command?

move

move;

move();

move()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What makes the following command an invalid Karel command?


turnleft();

It should end in a colon rather than a semicolon

The l should be a capital L

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 turnRight function in Karel?

function turnRight() {

turnLeft();

turnLeft();

turnLeft();

}

function turnRight() {

turnRight();

turnRight();

turnRight();

}

function turnRight {

turnLeft();

turnLeft();

turnLeft();

}

turnRight function() {

turnLeft();

turnLeft();

turnLeft();

}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use functions in Karel programs?

Break down our program into smaller parts

Avoid repeating code

Make our program more readable

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If Karel starts at Street 1 and Avenue 1, facing East, where will Karel be, and what direction will Karel be facing after running the following code? (Assume the world is 10x10 in size)

move();

turnLeft();

putBall();

turnLeft();

turnLeft();

turnLeft();

move();

turnLeft();

Street 3, Avenue 1, Facing North

Street 1, Avenue 4, Facing North

Street 1, Avenue 3, Facing South

Street 1, Avenue 3, Facing North

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Karel starts at Street 1 and Avenue 1, facing East. After calling the stairStep function twice, where will Karel be and what direction will Karel be facing? (assume this is a SuperKarel program and the world is 10x10 in size)

function stairStep() {

move();

turnLeft();

move();

turnRight();

}

Street 2, Avenue 2, Facing North

Street 3, Avenue 3, Facing East

Street 3, Avenue 3, Facing West

Street 4, Avenue 4, Facing East

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

function start() {

move();

dance();

move();

move();

turnLeft();

dance();

dance();

}


function dance() {

turnLeft();

move();

turnLeft();

turnLeft();

move();

turnLeft();

}

Called 1 time, defined 1 time

Called 1 time, defined 3 times

Called 3 times, defined 1 time

Called 3 times, defined 3 times

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?