WorksheetsCode.org CS Discoveries U3L15 Keyboard Input
Total questions: 10
Worksheet time: 6mins
The animation for the bug facing left begins with bug.rotation=0. If the user presses the right arrow, what should bug.rotation equal?
0
90
-90
180
The animation for the bug facing left begins with bug.rotation=0.. If the user presses the up arrow, what should bug.rotation equal?
0
90
-90
180
The animation for the bug facing left begins with bug.rotation=0. If the user presses the down arrow, what should bug.rotation equal?
0
90
-90
180
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.
keyWentDown(code)
keyDown(code)
keyWentUp(code)
drawSprites()
Checks if the key specified is pressed. To continually check if the key is pressed.
keyWentDown(code)
keyDown(code)
keyWentUp(code)
drawSprites()
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.
keyWentDown(code)
keyDown(code)
keyWentUp(code)
drawSprites()
keyDown('h) is a ...
boolean variable
boolean expression
boolean function
conditional statement
keyDown('h) returns the values ....
true
false
h
does not return a value
keyDown
background("white") returns the values ....
true
false
h
does not return a value
keyDown
var sprite = createSprite(200, 200); returns the values ....
true
false
does not return a value
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.
