wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Game Design Semester 1 Test Review

Total questions: 75

Worksheet time: 1hrs 27mins

Name
Class
Date
1.
Personal attributes that enable someone to interact effectively and harmoniously with others
a)
Soft Skills
b)
Hard Skills
c)
Harmonious Traits
d)
Personality Traits
2.
"Fake" code (not written in a true programming language) that is used to explain or detail specific tasks or aspects of an algorithm.
a)
scope
b)
syntax
c)
whitespace
d)
pseudocode
3.
A set of problem-solving methods that involve expressing problems and their solutions in ways that a computer could also execute.
a)
Decomposition
b)
Problem Solving
c)
Computational Thinking
d)
Pattern Recognition
4.
Separates a reference variable from a method using the dot operator.
a)
Period Notation
b)
Reference Notation
c)
Variable Notation
d)
Dot Notation
5.
A binary variable, having two possible values called "true" and "false".
a)
Boolean
b)
Conditional
c)
Relational
d)
Variable
6.
Logic statements that modify how code is executed and/or determine which code to execute
a)
Boolean
b)
Conditional
c)
Relational
d)
Variable
7.
Used to store information to be referenced and manipulated in a computer program.
a)
Boolean
b)
Conditional
c)
Relational
d)
Variable
8.
A symbol that compares two values.
a)
Boolean
b)
Conditional
c)
Relational
d)
Variable
9.
To provide a command or a signal to the computer from an outside source.
a)
Input
b)
Output
c)
Validation
d)
Method
10.
The action of checking or proving the accuracy of something.
a)
Input
b)
Output
c)
Validation
d)
Method
11.
Group of statements that are grouped together to perform a task when called.
a)
Input
b)
Output
c)
Validation
d)
Method
12.
Information converted from the computer displayed in a human-readable form.
a)
Input
b)
Output
c)
Validation
d)
Method
13.
The process of repeating something over and over again.
a)
Loop
b)
Iteration
c)
Initialization
d)
Condition
14.
A control structure in programming that allows you to repeat a block of code.
a)
Loop
b)
Iteration
c)
Initialization
d)
Condition
15.
A Boolean expression that is checked to determine whether or not the loop will execute.
a)
Loop
b)
Iteration
c)
Initialization
d)
Condition
16.
The process of assigning a value to a variable before the loop executes.
a)
Loop
b)
Iteration
c)
Initialization
d)
Condition
17.
The portion of code between the loop's curly braces that will execute repeatedly, as long as the condition is true.
a)
Body
b)
Condition
c)
Control Variable
d)
Procedure
18.
This is used within the loop's condition to help control the number of times the loop executes.
a)
Condition
b)
Procedure
c)
Control Variable
d)
Method
19.
Returns a value.
a)
Function
b)
Procedure
c)
Method
d)
Argument
20.
Does not return a value.
a)
Function
b)
Procedure
c)
Parameter
d)
Even-driven program
21.
Function and procedures used inside classes.
a)
Parameter
b)
Even-driven program
c)
Procedure
d)
Method
22.
A value passed to a function when the function is called.
a)
Method
b)
Argument
c)
Parameter
d)
Function
23.
A variable used to define a particular value during a function definition.
a)
Argument
b)
Parameter
c)
Even-driven program
d)
Function
24.
A programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or message passing from other programs or threads.
a)
Even-driven program
b)
Parameter
c)
Argument
d)
Function
25.
An example or single occurrence of something.
a)
Reference
b)
Object
c)
Method
d)
Instance
26.
An instance of a class.
a)
Object
b)
Reference
c)
Method
d)
Notation
27.
A process or set of rules to be followed.
a)
Pattern Recognition
b)
Algorithm
c)
Computer Program
d)
Processing
28.
Which programming command controls the size of the canvas?
a)
canvas();
b)
control();
c)
size();
d)
stroke();
29.
Which programming command creates a rectangle or square?
a)
rect();
b)
square();
c)
shape();
d)
ellipse();
30.
Which programming command creates a circle or oval?
a)
circle();
b)
oval();
c)
rect();
d)
ellipse();
31.
What does % (mod) do?
a)
finds the remainder of two numbers
b)
finds the answer of two numbers divided
c)
multiplies two numbers
d)
subtracts two numbers
32.
Which programming command controls the color of the outline of a shape?
a)
noStroke();
b)
strokeWeight();
c)
fill();
d)
stroke();
33.
Which programming command removes the outline from a shape?
a)
noStroke();
b)
strokeWeight();
c)
fill();
d)
stroke();
34.
Which programming command controls the size of the outline of a shape?
a)
noStroke();
b)
strokeWeight();
c)
fill();
d)
stroke();
35.
A number that can be written as a fraction and is displayed as a decimal.
a)
Floating Point Number
b)
Integer
c)
Qualitative
d)
Quantitative
36.
Information that can be used for mathematical calculations and statistical analysis.
a)
Floating Point Number
b)
Integer
c)
Qualitative
d)
Quantitative
37.
Non-numerical data that describes characteristics.
a)
Floating Point Number
b)
Integer
c)
Qualitative
d)
Quantitative
38.
Returns an int, the number of chars in the string.
a)
.substring(int firstOneYouWant, int firstOneYouDontWant)
b)
.toUpperCase()
c)
.charAt(int index)
d)
.length()
39.
Returns the substring from the first int up to but not including the second.
a)
.substring(int firstOneYouWant, int firstOneYouDontWant)
b)
.toUpperCase()
c)
.charAt(int index)
d)
.length()
40.
Transforms the string to uppercase.
a)
.substring(int firstOneYouWant, int firstOneYouDontWant)
b)
.toUpperCase()
c)
.charAt(int index)
d)
.length()
41.
Returns the substring from the specified index to the end.
a)
.substring(int firstOneYouWant, int firstOneYouDontWant)
b)
.substring(int firstOneYouWant)
c)
.charAt(int index)
d)
.toLowerCase()
42.
Returns the char value to the specified index.
a)
.substring(int firstOneYouWant, int firstOneYouDontWant)
b)
.substring(int firstOneYouWant)
c)
.charAt(int index)
d)
.toLowerCase()
43.
This is utilized to update the value stored in the loop's control variable, so the loop does not become an infinite loop.
a)
Control Variable
b)
Update
c)
Progress Variable
d)
Loop Variable
44.
To balance one influence against an opposing influence, so that there is no great difference as a result.
a)
Translate
b)
Anchor
c)
Exhibition
d)
Offset
45.
To move from one place or condition to another.
a)
Translate
b)
Anchor
c)
Exhibition
d)
Offset
46.
Something that rises straight up from a horizontal line or plane. (up and down)
a)
Translate
b)
Anchor
c)
Horizontal
d)
Vertical
47.
Something that is arranged sideways. (side to side)
a)
Vertical
b)
Horizontal
c)
Anchor
d)
Translate
48.
Provide with a firm basis or foundation.
a)
Vertical
b)
Horizontal
c)
Anchor
d)
Translate
49.
Refers to the three hues of light that can be mixed together to create different colors.
a)
RGB
b)
BGR
c)
GRB
d)
GBR
50.
If you have background(0, 0, 255); , what color is your background?
a)
red
b)
green
c)
blue
d)
black
51.
If you have background(0, 255, 0); , what color is your background?
a)
red
b)
green
c)
blue
d)
black
52.
Which section of processing code is an example of an event handler?
a)
draw( )
b)
setup( )
c)
mousePressed( )
d)
settings( )
53.

Consider the following code segment:
Scanner sc = new Scanner(System.in);
int input;
input = sc.nextInt();
if(input > 0) { System.out.println("Fizz");
}
else { System.out.println("Buzz");
}
Which user input will result in "Buzz" being displayed on the console?

a)
2
b)
-5
c)
5
d)
0
54.

Consider the following Java code segment:
Scanner sc = new Scanner(System.in);
double input;
input = sc.nextDouble();
System.out.println("You said: " + input);
Which of the following user inputs would cause the program to crash?

a)
8.67
b)
3
c)
6
d)
1.2.3
55.

Consider the following Main.java file from a repl.it project.
import java.util.Scanner;
class Main {
public static void main(String[] args)
{
Scanner kb = Scanner(System.in);
int input;
input = kb.nextInt();
if(input % 3 == 1) {
System.out.println("Fizz");
}
else {
System.out.println("Buzz");
}
}
}
When the project is compiled, it generates the following error message:
Main.java:4: error: cannot find symbol Scanner kb = Scanner(System.in); ^ symbol: method Scanner(InputStream) location: class Main
What must you do to resolve this issue?

a)
There is a problem with mismatched curly braces
b)
Line 4 should include the new keyword
c)
Use Scanner sc instead of Scanner kb
d)
Line 4 should say Scanner kb = Scanner(System.out);
56.

A student wrote the following code segment which uses a Scanner named sc to read from System.in.
5
6 int num;
7 String word;
8
9 System.out.print("Enter an integer: ");
10 num = sc.nextInt( );
11
12 System.out.print("Enter a word: ");
13 word = sc.nextLine( );
14
15 if(num > word.length( ))) {
16 System.out.println(num);
17 }
18 else {
19 System.out.println(word);
20 }
21
The program should read in a number and a word from the keyboard and then compare the number provided to the length of the word. If the number entered is greater than the number of characters in the word, the program should display the number. Otherwise, the program should display the word. The program is not behaving as expected. Which of the following would resolve the error?

a)
Add sc.nextLine( ); to line 11
b)
Change the > to >= in line 15
c)
Exchange lines 16 and 19
d)
Exchange lines 6 and 7
57.

Consider the following code segment:
String str = “90739”;
char ch = str.charAt(1);
System.out.println(ch);
What is displayed on the console when the code segment runs?

a)
90739
b)
9
c)
0
d)
90
58.

In the "Return the Ball" program provided, which variable represents the current speed and direction of the ball?
import processing.core.PApplet;
public class Sketch extends PApplet {
float diameter;
float xPosition;
float step;
public void settings() {
size(600, 375);
}
public void setup() {
diameter = 25;
xPosition = diameter / 2;
step = 2;
}
public void draw() {
background(0);
fill(255);
ellipse(xPosition, height / 2, diameter, diameter);
if( xPosition + diameter / 2 >= width ) {
step = step * -1;
}
xPosition = xPosition + step;

}
}

a)
step
b)
xPosition
c)
diameter
d)
float
59.
Which rule does the following variable name break (if any)? ten%tip
a)
Variable names must be unique within scope/ Not a reserved word
b)
Variable names may contain only letters, digits, underscores, and dollar signs
c)
Variable name must begin with a letter, an underscore, or a dollar sign
d)
This variable name does not break any of the rules
60.
Which convention does the following variable name break (if any)? number_Of_Children
a)
Variable names should avoid $ and _ characters
b)
This variable name does not break any of the rules
c)
Variable name should be short yet meaningful
d)
Variable names should use camelCase
61.
Consider the following code segment: ellipse(8, 6, 7, 5); What aspect does the third number (the 7) specify?
a)
The horizontal position (side to side)
b)
The vertical position (up and down)
c)
The horizontal size (width)
d)
The vertical size (height)
62.
This is used to explain Java code, and to make it more readable.
a)
Whitespace
b)
Comments
c)
Conventions
d)
Syntax
63.
Any character or series of characters that represent horizontal or vertical spacing.
a)
Whitespace
b)
Comments
c)
Conventions
d)
Syntax
64.
Guidelines for a specific programming language that recommend programming style, practices, and methods for each aspect of a program written in that language.
a)
Whitespace
b)
Comments
c)
Conventions
d)
Syntax
65.
These are the grammar rules in a programming language that tells the computer how to understand and execute the instructions you give it. Keywords and punctuation are included in this.
a)
Whitespace
b)
Comments
c)
Conventions
d)
Syntax
66.
This is a way to write words together without using spaces or special characters. Instead, you capitalize the first letter of each new word.
a)
CamelCase
b)
LowerCase
c)
UpperCase
d)
CharacterCase
67.
In programming, _______ is like a boundary that defines where a piece of information (like a variable or a function) can be used. Think of it as the area where something is valid or applicable in your code.
a)
Syntax
b)
Conventions
c)
Scope
d)
Whitespace
68.
________ is a sequence of well-defined steps to solve a problems or perform a task.
a)
Expression
b)
Operator
c)
Floating Point
d)
Algorithm
69.
To shorten by cutting off. (example: 2.3 is shortened to 2)
a)
Mod
b)
Abstraction
c)
Truncate
d)
Automate
70.

What would the output be for this code segment?
int i = 0;
while( i < 10 ) {
System․out․print(i + " ");
i = i + 2;
}

a)
0 2 4 6 8
b)
02468
c)
8 6 4 2 0
d)
86420
71.

int a = 100;
while( a > 5 ) {
System.out.print(a + " ");
/* Missing Code */
}
The code segment above has some code missing. When complete, the segment should display the following output on the console: 100 25 6 Which of the following choices below should replace /* Missing Code */ so the completed program produces the correct output?

a)
a = a - 67
b)
a = a / 2
c)
a = a / 3
d)
a = a / 4
72.

/* Missing Code */

while( a < 10 ) {

System.out.print(a + " ");

a = a + 3;

}

The code segment above has some code missing. When complete, the segment should display the following output on the console: 2 5 8 Which of the following choices below should replace /* Missing Code */ so the completed program produces the correct output

a)
int a = 1;
b)
int a = 3;
c)
int a = 2;
d)
int a = 0;
73.

What is the output for the following code segment:

int i = 1;

while( i < 10 ) {

i = i * 2;

System․out․print(i + " ");

}

a)
2 4 8 16
b)
24816
c)
16 8 4 2
d)
16842
74.

How many ellipses will display from the following code segment:
int x = 50;

size (300, 300);

while (x <= 250) {

ellipse (x, 90, 40, 60);

x = x + 100;

}

a)
1
b)
2
c)
3
d)
4
75.

Predict the output of the following Java program.

static int alpha;

static int bravo;

static int charlie;

public static void main(String[] args) {

pandora();

netflix();

youtube();

youtube();

hulu();

}

public static void youtube() {

alpha = bravo - charlie;

bravo = charlie; charlie = 9;

}

public static void netflix() {

alpha = bravo;

bravo = charlie;

charlie = alpha - bravo;

}

public static void hulu() {

System․out․println(alpha);

System․out․println(bravo);

System․out․println(charlie);

}

public static void pandora() {

alpha = 8;

bravo = 6;

charlie = 7;

}

a)
11 -2 9
b)
-10 9 9
c)
8 -1 9
d)
7 9 -2