wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

*Computer Science Test*

Total questions: 55

Worksheet time: 3hrs 43mins

Name
Class
Date
1.

A part of the program that does not work correctly.

a)

Bug

b)

Break

c)

Loop

d)

Variable

2.

What is debugging?

a)

taking an insect out of the computer or off the screen

b)

finding & fixing a problems in an algorithm or program

c)

breaking down a problem to simple solution

d)

putting commands in a specific order to catch errors

3.

What does run mean?

a)

to make a code for a program

b)

to make a program complete an algorithm

c)

to make a website show up on your screen

d)

to make loops never stop

4.

Using the powers of computers to solve problems.

a)

computer science

b)

computational thinking

c)

for loop

d)

command

5.

The language of computer programming is

a)

Spanish

b)

English

c)

Code

d)

Pig-latin

6.

Which variable is named correctly?

a)

4sides

b)

Sidesfour

c)

sides4

d)

SidesFour

7.

What is x value in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

8.

What is y value in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

9.

What is width of the rectangle in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

10.

What is height of the rectangle in the following code?

rect(250, 200, 75, 225);

a)

250

b)

200

c)

75

d)

225

11.

sprite.scale

Controls...

a)

It controls the sprites X position

b)

It controls the sprite's Y position

c)

It controls the size of the sprite

d)

It controls the sprite's rotation

12.

Which sprite property would you change to make the sprite turn in a circle?

a)

sprite.x

b)

sprite.y

c)

sprite.scale

d)

sprite.rotation

13.
Sprite
a)
A graphic character on the screen with properties that describe its location, movement, and look.
b)
 A placeholder for a piece of information that can change.
c)
Attributes that describe an object's characteristics
d)
An algorithm that has been coded into something that can be run by a machine.
14.

A label for a characteristic of a piece of information used in a program or sprite, such as its location and appearance.

a)

Variable

b)

Random

c)

Property

d)

Sprite

15.

A character on the screen with properties that describe its location, movement, and look.


a)

Variable

b)

Property

c)

Random

d)

Sprite

16.

How can we correct the code above? We are getting the error message (dessert is defined, but it is not called in your program)

a)

Change drink to dessert in the 6th line of code

b)

Change drink to ice cream in the 6th line of code

c)

Change drink to sprite in the 6th in of code

17.

Which of the following are valid label names?

a)

1team

b)

size_of _eye

c)

petalsize

d)

PinkBunny

e)

uploadedImage

18.

What will most likely happen when this code is run?

a)

Everything will be there, except for the sprites, because the programer didn't put drawSprites();

b)

Only the sprites will be there becuase the programer didn't put drawCode();

c)

Nothing will be there because the programer didn't put drawSprites(); or drawCode();

d)

Everything will be there because the programer put all of the needed code

19.

The progarmer had sprites in the code. What could have happened?

a)

They forgot to put drawSprites();

b)

They put the background over them

c)

They put the wrong names in the wrong spots

d)

The animations they put didn't exist

20.

What is the problem in this code? What can you do to fix the problem?

choose 1 green and 1 blue

a)

The background came last, not first.

b)

They didn't put drawSprites();

c)

Move the background to the front of the code.

d)

Add drawSprites();

e)

Something Else

21.

Which random number code is correct?

a)

randomNumber(1, 10)

b)

randomNumber(1, 10);

c)

randomNumber(1, 10):

d)

RandomNumber(1, 10)

e)

randomnumber(1, 10)

22.

randomNumber(1, 10);

what is the minimum

(a)  

23.

randomNumber(1, 10);

what is the maximum

(a)  

24.

This is what a student wrote on their notes:

____________________________________________

The randomNumber(1, 10); code chooses a random number between the minimum( first #) and maximum (second #)

___________________________________________

Are they correct?

a)

Yes

b)

No

25.

Which is the correct example for the text code?

a)

text("Your Words Here!", x, y);

b)

words("Your Words Here!", x, y);

c)

text("Your Words Here!", x, y)

d)

text(Your Words Here!, x, y);

26.

The purple sprite block ________________.

a)

Determines a sprite

b)

Adds a sprite to the screen

c)

Draws the sprite

d)

Changes the sprites size

27.

The pink sprite block ____________________.

a)

Puts a sprite on the screen

b)

Gets a sprite ready to be put on the screen by drawSprites();

c)

Draws a sprite

d)

Determines a sprite

28.

How are you confident in coding?

a)

Only using blocks:l

b)

Only using text code :l

c)

Using both blocks and text code :)

d)

Not at all :(

e)

I'm not the best or the worst at either :l

29.

What does the "fill()" command do?

a)

Set the color for future shapes

b)

Fills the background with a specified color

c)

Draw a shape with the color specified

d)

Draw a shape that has been previously stated in a variable

30.

What is the difference between "ellipse()" and "rect()"?

a)

rect() draws a rectangle and ellipse() draws a rectangle

b)

rect() draws a rectangle and ellipse() draws a circle

c)

rect() draws a circle and ellipse() draws a circle

d)

rect() draws a polygon and ellipse() draws a triangle

31.

Which of these will create a blue rectangle in the bottom left corner of the screen?

a)

fill("Blue"); rect(50, 350,50,50)

b)

fill("Red); rect(350, 350, 50, 50);

c)

fill("Blue"); rect(200, 200, 50, 50);

d)

fill("Blue"); rect(300, 350, 50, 50);

32.

Variable-

a)

A placeholder for information that can change

b)

A placeholder for information that can't change

c)

An image that can have animations

d)

A way to store your images

33.

What does the DrawSprite function do?

a)

It draws all the sprites in the animation tab

b)

It draws all sprites defined by a variable

c)

It draws a spooky ghost

d)

It defines all the sprites in the animation tab

34.

How do you correctly define a sprite?

a)

var "sprite" createSprite(200,200)

b)

var sprite= createSprite();

c)

var="sprite" createSprite(200,200);

d)

var sprite= createSprite(200, 200);

35.

What will the pencil and brush sprites appear to do in this code?

a)

Randomly redraw left and right on top of themselves

b)

Randomly redraw up and down on top of themselves

c)

Randomly move up and down

d)

Randomly move left and right

36.
a)

Move up smoothly

b)

Move randomly up and down

c)

Move left smoothly

d)

Move right smoothly

37.
a)

Rotate smoothly counterclockwise

b)

Move smoothly up

c)

Move smoothly down


d)

Rotate smoothly clockwise

38.
a)

Move smoothly down and to the left

b)

Move smoothly up and to the left

c)

Move smoothly down and to the right

d)

Move smoothly up and to the right

39.
a)

It creates my Sprite at the coordinates (50, 200)

b)

It makes my Sprite move left and right between 50 and 200

c)

It makes my Sprite move up and down between 50 and 200

d)

It moves my sprite to the coordinates (50, 200)

40.

a)

a green circle

b)

it won't appear because I haven't drawn it yet

c)

a green square

d)

a gray square

41.
a)

It will replace my Sprite with a picture of a bunny

b)

It will make my Sprite appear on the screen

c)

It will make my Sprite appear and disappear

d)

It will make my Sprite look like a plane

42.
a)

It will mark an x next to my Sprite

b)

It will make the y coordinate of my Sprite be 300

c)

It will make my Sprite move 300 spaces to the right

d)

It will make the x coordinate of my Sprite be 300

43.

a)

1st one

b)

2nd one

c)

3rd one

d)

4th one

44.

a)

1st one

b)

2nd one

c)

3rd one

d)

4th one

45.

a)

1st one

b)

2nd one

c)

3rd one

d)

4th one

46.

What would be the correct definition of a bug in computer science?

a)

A fully working program

b)

Something about a moth in an old computer

c)

Something we ate as children

d)

A part of a program that does not work correctly

47.
a)

Missing a )

b)

Missing a (

c)

Missing a >

d)

Missing a ;

e)

Missing a ]

48.

Which property could I use to make my sprite move in a circular motion?

a)

sprite.width

b)

sprite.scale

c)

sprite.rotation

d)

sprite.circle

49.

What is the purpose of the randomNumber(min,max) command?

a)

Returns a random number between your min and max

b)

Returns a number that is outside of your min and max

c)

Returns nothing

d)

Returns a specific number the user put in

50.

What does the y axis do?

a)

Create a random position for the sprite

b)

Moves object in circles

c)

Moves objects to the left and right

d)

Move objects up and down

51.

What does the X axis do?

a)

Moves objects to the left and right

b)

Create random location for objects

c)

Moves objects up and down

d)

Moves object in circles

52.

Which is not a label rule?

a)

Labels are case sensitive

b)

A label cannot have spaces

c)

A label cannot begin with a number

d)

Labels cannot have numbers

53.

Order of code matters

a)

True

b)

False

54.

What is the name of the programming language we are using?

(a)  

55.
a)

rect ( y, x, w, h)

b)

rect (h, w , y, x)

c)

rect (w, h, x, y)

d)

rect (x, y, w, h)