wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Comp. Sci. 1 Nine wks. exam Review

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

What is a street in a Karel world?

a)

A row

b)

A column

c)

A single point

d)

Karel’s position

2.

What is an avenue in a Karel world?

a)

A row

b)

A column

c)

A single point

d)

Karel's Position

3.

If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue (column) will Karel be on after this code runs?

a)

Street 1 and Avenue 3

b)

Street 4 and Avenue 4

c)

Street 2 and Avenue 6

d)

Street 6 and Avenue 2

4.

If Karel is facing North and the code

a)

North

b)

South

c)

East

d)

West

5.

How many times should Karel turn left in order to turn right?

a)

1

b)

2

c)

3

d)

4

6.

What can be used to teach Karel to turn right?

a)

Functions

b)

Variables

c)

Dog treats

d)

Karel can already turn right

7.

Which function will teach Karel how to spin in a circle one time?

a)
b)
c)
d)
8.

How many times should the start function be defined in a program?

a)

0

b)

1

c)

2

d)

However many you would like

9.

How many times should you call the start function in a program?

a)

0

b)

1

c)

2

d)

However many you would like

10.

Why do we use functions in programming?

a)

Break down our program into smaller parts

b)

Avoid repeating code

c)

Make our program more readable

d)

All of the above

11.

What is top down design?

a)

Top down design is a way of designing your program by starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to solve.

b)

Top down design is a way that you can create designs on a computer to put on a web page

c)

Top down design is a way of designing your programs starting with the individual commands first

d)

Top down design is a way to use loops and classes to decompose the problem

12.

What is a code comment?

a)

A way to teach Karel a new word

b)

A way to give notes to the reader to explain what your code is doing

c)

A message to your teacher in code

d)

A place to write whatever you want in your code

13.

What commands does SuperKarel know that regular Karel does not?

a)

turnLeft() and jump()

b)

turnRight() and jump()

c)

turnAround() and turnRight()

d)

turnAround() and jump()

14.

What is the best way for Karel to move 10 times?

a)
b)
c)
d)
15.

Why do we use if statements in JavaScript?

a)

To break out of some block of code

b)

To do something only if a condition is true

c)

To do something while a condition is true

d)

To repeat something for a fixed number of times

16.

Which general if statement definition is written correctly?

a)
b)
c)
d)
17.

Why do we use if/else statements in JavaScript?

a)

To repeat something for a fixed number of times

b)

To either do something if a condition is true or do something else

c)

To break out of some block of code

d)

To repeat something while a condition is true

18.

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

a)
b)
c)
d)
19.

Why do we use while loops in JavaScript?

a)

To break out of some block of code

b)

To do something if a condition is true

c)

To repeat some code while a condition is true

d)

To repeat something for a fixed number of times

20.

Which general while loop definition is written correctly?

a)
b)
c)
d)