wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Coding Test Review

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

What is object oriented programming?

a)
A way to create static websites
b)
A programming language used for web development
c)

A programming paradigm that uses 'objects' to design software.

d)
A method for writing procedural code
2.

What is abstraction?

a)
Abstraction refers to the process of making things more complicated.
b)
Abstraction is the act of creating physical models of objects.
c)
Abstraction is the process of simplifying complex systems by modeling classes based on the essential properties and behaviors while hiding unnecessary details.
d)
Abstraction is a method of increasing detail in programming.
3.

What is encapsulation in coding?

a)
Encapsulation is the technique of inheriting properties from another class.
b)
Encapsulation is the practice of bundling the data and methods that operate on that data within a single unit, typically a class, while restricting access to some of the object's components.
c)
Encapsulation refers to the visibility of class members in programming.
d)
Encapsulation is the process of separating data from methods.
4.

What is polymorphism in coding?

a)
Polymorphism is the ability of different classes to be treated as instances of the same class through a common interface.
b)
Polymorphism is a method of data encryption in programming.
c)
Polymorphism refers to the process of optimizing code for performance.
d)
Polymorphism is the ability to create multiple instances of a class.
5.

What is inheritance in coding?

a)
Inheritance allows a class to operate independently of other classes.
b)
Inheritance is a way to delete attributes from a class.
c)
Inheritance is a method for creating new classes without any relationship.
d)
Inheritance allows a class to inherit attributes and methods from another class.
6.

What is a method in coding?

a)
A method is a standalone function outside of any class.
b)
A method is a variable that stores data in a class.
c)
A method is a function defined within a class that operates on instances of that class.
d)
A method is a type of data structure used in programming.
7.

What is an array in coding?

a)
An array is a single element of data.
b)
An array is a method for sorting data.
c)
An array is a type of function in coding.
d)
An array is a collection of elements identified by index or key, typically of the same data type.
8.

What is a for loop?

a)
A for loop is used to iterate over a sequence (like a list or range) and execute a block of code multiple times.
b)
A for loop is used to declare variables.
c)
A for loop is a type of conditional statement.
d)
A for loop is used to define a function.
9.

What is a while loop?

a)
A while loop is a type of variable.
b)
A while loop is used to define functions.
c)
A while loop is a control structure that repeatedly executes a block of code as long as a specified condition is true.
d)
A while loop is a data structure for storing values.
10.

What is a conditional in coding?

a)
A conditional is a function that always returns a value.
b)
A conditional is a type of variable that stores data.
c)
A conditional is a statement that executes different code based on a true or false condition.
d)
A conditional is a loop that repeats code multiple times.
11.

What is a variable in coding?

a)
A variable is a fixed value that cannot be changed.
b)
A variable is a type of data structure that stores multiple values.
c)
A variable is a command that executes a function in the program.
d)
A variable is a symbolic name for a value that can change during program execution.
12.

Which is an example of a method in C# coding?

a)
float Multiply(float x, float y) { return x - y; }
b)
public void Display() { Console.WriteLine('Hello'); }
c)
public int Add(int a, int b) { return a + b; }
d)
int Add(int a) { return a; }
13.

Which is an example of a conditional in C# coding?

a)
while (condition) { // code to execute }
b)
for (int i = 0; i < 10; i++) { // loop code }
c)
switch (variable) { // case statements }
d)
if (condition) { // code to execute if condition is true }
14.

Which is an example of an array in C# coding?

a)

public int numbers[5];

b)

public array numbers = new array[5];

c)

public int[] numbers = {1,2,3,4,5}

d)
int numbers = new int[];
15.

Which is an example of a for loop in C# coding?

a)
foreach(int i in myArray) { Console.WriteLine(i); }
b)
for(int i = 0; i < 10; i++) { Console.WriteLine(i); }
c)

while(int i = 0; i < 10; i--) { Console.WriteLine(i); }

d)

if(condition) {i+4}

16.

Which is an example of a while loop in C# coding?

a)
if (condition) { // code to execute }
b)
do { // code to execute } while (condition);
c)
for (int i = 0; i < 10; i++) { // code to execute }
d)
while (condition) { // code to execute }
17.

What are the four return types?

a)
Integer, Float, String, Boolean
b)
Array
c)
List
d)
Dictionary
18.

Bool is for?

a)

Conditionals

b)

Integers

c)

Numbers

d)

Text/Words

19.

Int is for?

a)

Text/Words

b)

Integers

c)

Numbers

d)

Conditionals

20.

String is for?

a)

Conditionals

b)

Numbers

c)

Text/Words

d)

Integers

21.

Float is for?

a)

Numbers with decimals

b)

Any number

c)

Integers

d)

Text