wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Diagnostic Test Computer Science

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

You are given the following pseudocode:

SET counter TO 0 FOR i FROM 1 TO 5. counter ← counter + 2 ENDFOR OUTPUT counter What is the final output of this algorithm?

a)

0

b)

5

c)

10

d)

25

2.

What type of data is most suitable for storing whether a student has passed an exam (true or false)?

a)

Integer

b)

String

c)

Real

d)

Boolean

3.

A school wants to store the names of 30 students in a class. What is the main advantage of using a one-dimensional array for this task instead of 30 separate string variables?

a)

Arrays use less memory.

b)

Arrays allow managing all names under a single identifier, making code writing and maintenance easier (for example, using a loop).

c)

Arrays automatically sort names alphabetically.

d)

Arrays can store different types of data together.

4.

The process of converting analog sound into a digital format involves two main steps. These are:

a)

Compression and Encryption

b)

Sampling and Quantization

c)

Upload and Download

d)

Recovery and Execution

5.

Which of the following is a main task of a computer's operating system?

a)

Create text documents and presentations.

b)

Manage the memory and processes of the computer.

c)

Provide electrical power to the components.

d)

Design the physical layout of the motherboard.

6.

In the Recover-Decode-Execute cycle, what is the purpose of the 'Decode' step?

a)

Retrieve the next instruction from memory.

b)

Increment the value of the Program Counter.

c)

Make sense of the instruction that was retrieved.

d)

Execute the instruction.

7.

You are looking for a specific book in a library where all the books are sorted by the author's last name. What search algorithm would be the most efficient?

a)

Linear Search

b)

Binary Search

c)

Bubble Search

d)

Random Search

8.

A network where all devices are connected to a switch or central server is known as a ________ topology.

a)

Bus

b)

Ring

c)

Star

d)

Mesh

9.

The main purpose of a protocol like HTTP is:

a)

To provide power to a network router.

b)

To define a set of rules on how web browsers and servers communicate.

c)

To physically connect a computer to a network.

d)

To prevent viruses from infecting a computer.

10.

What is the main purpose of a parity bit in data transmission?

a)

Encrypt the data for greater security.

b)

Compress the data to save space.

c)

Detect simple errors in the transmitted data.

d)

Increase the transmission speed.

11.

A program is designed to calculate the average of three numbers. Which of the following is an example of invalid test data for this program?

a)

(5, 5, 5)

b)

(-1, 0, 1)

c)

(Ten, Twenty, Thirty)

d)

(1000000, 2000000, 3000000)

12.

What is the central idea behind 'Big Data'?

a)

To use the largest possible hard drives.

b)

The analysis of extremely large and complex datasets to reveal patterns and trends.

c)

To send large files over the internet.

d)

The physical size of database servers.

13.

The programmer writes a line of code like PRINT "Hello World", but the correct syntax of the language is print(). The program will fail to execute. This is an example of a:

a)

Logical error

b)

Runtime error

c)

Syntax error

d)

Network error

14.

In a spreadsheet, which function would you use to find the smallest value in a range of cells (for example, A1 to A10)?

a)

=MIN(A1:A10)

b)

=MAX(A1:A10)

c)

=COUNT(A1:A10)

d)

=SUM(A1:A10)

15.

The main purpose of using iterative development in a programming project is:

a)

To write all the code perfectly on the first attempt.

b)

To create a prototype, test it, get feedback, and improve it in repeated cycles.

c)

To iterate means to use loops in the code.

d)

To ensure that the program only uses the latest technology.

16.

What is the main difference between a compiler and an interpreter?

a)

A compiler translates the code all at once, while an interpreter translates and executes line by line.

b)

An interpreter is faster in executing code than a compiler.

c)

A compiler is only used for web pages.

d)

An interpreter produces a standalone executable file.

17.

A driver is a type of utility software. What is its main function?

a)

Protect against viruses.

b)

Organize files on a hard drive.

c)

Allow the operating system to communicate with a hardware device (such as a printer).

d)

Connect to the Internet.

18.

When evaluating a new prototype for a smart watch, which factor is most related to accessibility?

a)

The battery life of the device.

b)

How easy it is for people with visual disabilities to use the touchscreen and hear its audio signals.

c)

The processing speed of its CPU.

d)

The number of different colors it has.

19.

A weather station uses an anemometer. This is an example of a:

a)

Actuator

b)

Sensor

c)

Output device

d)

Storage device

20.

Look at the algorithm in pseudocode. This algorithm is an example of which two programming constructs?

a)

Sequence and Iteration

b)

Sequence and Selection

c)

Selection and Iteration

d)

Variables and Operators