Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code.org CS Discoveries U3L15 Keyboard Input

Total questions: 10

Worksheet time: 6mins

Name
Class
Date
1.

The animation for the bug facing left begins with bug.rotation=0. If the user presses the right arrow, what should bug.rotation equal?

a)

0

b)

90

c)

-90

d)

180

2.

The animation for the bug facing left begins with bug.rotation=0.. If the user presses the up arrow, what should bug.rotation equal?

a)

0

b)

90

c)

-90

d)

180

3.

The animation for the bug facing left begins with bug.rotation=0. If the user presses the down arrow, what should bug.rotation equal?

a)

0

b)

90

c)

-90

d)

180

4.

Checks if the key specified was released. Generates a single true value when the key is released, no matter how long a key is pressed.

a)

keyWentDown(code)

b)

keyDown(code)

c)

keyWentUp(code)

d)

drawSprites()

5.

Checks if the key specified is pressed. To continually check if the key is pressed.

a)

keyWentDown(code)

b)

keyDown(code)

c)

keyWentUp(code)

d)

drawSprites()

6.

Checks if the key specified was pressed. Generates a single true value when the key is pressed down, no matter how long a key is pressed.

a)

keyWentDown(code)

b)

keyDown(code)

c)

keyWentUp(code)

d)

drawSprites()

7.

keyDown('h) is a ...

a)

boolean variable

b)

boolean expression

c)

boolean function

d)

conditional statement

8.

keyDown('h) returns the values ....

a)

true

b)

false

c)

h

d)

does not return a value

e)

keyDown

9.

background("white") returns the values ....

a)

true

b)

false

c)

h

d)

does not return a value

e)

keyDown

10.

var sprite = createSprite(200, 200); returns the values ....

a)

true

b)

false

c)

does not return a value

d)

Creates a new sprite and assigns it to the variable specified. ... A sprite is able to store images or animations with a set of properties such as position and visibility.