wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CCGA Unit 4 and 5

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What is a variable type that can be either true or false?
a)
Number
b)
String
c)
Picture
d)
randomBoolean
2.
A programming construct used for making decisions within a program...also called an if/then or if/then/else statement. 
a)
Event
b)
Loop
c)
Conditional
d)
On every frame
3.
What is something that happens outside a program (like a screen tap or mouse click) that the program can respond to?
a)
Event
b)
Loop
c)
Conditional
d)
On every frame
4.
What is a function that the program evaluates the condition over and over, and then your code is executed when the condition is met?
a)
Event
b)
Loop
c)
Conditional
d)
On every frame
5.
What is data that is passed to a function. 
a)
Logic
b)
Boolean
c)
Parameter
d)
Variable type
6.
What is the term for a variable inside a function that has a name and a type?
a)
Event
b)
For loop
c)
Conditional
d)
Input Parameter
7.
What is the term for the type of data that a variable can contain, for example a numberstring, and sprite.
a)
Event
b)
Loop
c)
Conditional
d)
Variable type
8.
What is a function created by the programmer, has a specific purpose and can be/is used in multiple places within a program?
a)
Function
b)
Custom Function
c)
For loop
d)
Input Parameter
9.
Consider the following code:
turtle --> set heading (0)
What direction does the turtle heading move?
a)
North (up)
b)
south (down)
c)
East (right)
d)
West (left)
10.
Consider the following code:
turtle --> set heading (90)
What direction does the turtle heading move?
a)
North (up)
b)
South (down)
c)
East (right)
d)
(West) left
11.
Which line of code below will place gravity on the hero object?
a)
hero-->set angle(30)
b)
hero-->set acceleration y(300)
c)
hero-->set yspeed(300)
d)
hero-->set position(x, y)
12.
Which term below does not describe and event?
a)
Screen tap
b)
Mouse click
c)
Key stroke
d)
Bounce on sides
13.
What is the purpose of an else clause in a conditional statement in computer programming?
a)
Instructions in a conditional for a true return
b)
Instructions in a conditional for a false return
c)
Instructions in a conditional for a random return
d)
Instructions in a conditional for a repeated return
14.
What is the output after executing the following code?  
var random num:= math->random range(-100,100)
if num < 0
“Hello”->post to wall
else 
“Wow!”->post to wall
end if  “Goodbye”->post to wall 
a)
If the random number chosen is greater than 0, the user will see the word “Hello” and then the word “Goodbye”. If the number is less than 0, only the word “Goodbye” will appear.
b)
If the random number chosen is less than 0, the user will see the word “Hello” and then the word “Goodbye”. If the number is greater than 0, the user will see the word “Wow” and then the word “Goodbye”.
c)
Both answers are correct.
d)
Neither answer it correct.
15.
What is the output after executing the following code? 
var random num:= math->random range(-100,100)
if random num > 0  “Hello”->post to wall
else do nothing
end if 
“Goodbye”->post to wall 
a)
If the random number chosen is greater than 0, the user will see the word “Hello” and then the word “Goodbye”. If the number is less than 0, only the word “Goodbye” will appear.
b)
If the random number chosen is less than 0, the user will see the word “Hello” and then the word “Goodbye”. If the number is less than 0, the user will see the word “Wow” and then the word “Goodbye”.
c)
Both answer are correct.
d)
Neither answer is correct.