wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algorithm Design, PDLC, and Basics Worksheet

Total questions: 95

Worksheet time: 48mins

Name
Class
Date
1.

What is the first stage of the Program Development Life Cycle (PDLC)?

a)

Coding

b)

Testing

c)

Analysis

d)

Maintenance

2.

During the analysis stage, which technique focuses on ignoring unnecessary details?

a)

Iteration

b)

Decomposition

c)

Abstraction

d)

Validation

3.

Breaking a large problem into smaller sub-problems is called:

a)

Abstraction

b)

Decomposition

c)

Verification

d)

Iteration

4.

Which stage of PDLC uses tools like structure charts, flowcharts and pseudocode?

a)

Analysis

b)

Design

c)

Testing

d)

Maintenance

5.

What is iterative testing?

a)

Testing after the program is released

b)

Testing once at the end

c)

Repeating tests on modules and fixing errors until correct

d)

Testing only with abnormal data

6.

A requirements specification is produced in which stage?

a)

Coding

b)

Analysis

c)

Design

d)

Maintenance

7.

Which document would most likely contain pseudocode and flowcharts?

a)

Maintenance log

b)

Program design document

c)

User manual

d)

Test plan only

8.

Which statement best describes an algorithm?

a)

A single test case

b)

A set of ordered steps to solve a problem

c)

A hardware diagram

d)

A data type

9.

A structure diagram mainly shows:

a)

Variables and data types

b)

Top-down breakdown into sub-systems

c)

Network connections

d)

Test data sets

10.

Which of these occurs in the maintenance stage?

a)

Adding new features after the system is in use

b)

Writing initial pseudocode

c)

Designing test tables

d)

Abstraction and decomposition

11.

Which tool is used to visually show the sequence, selection and iteration in a solution?

a)

Structure diagram

b)

Truth table

c)

Flowchart

d)

Entity-relationship diagram

12.

What is meant by a dry run?

a)

Running code with no input

b)

Manually stepping through an algorithm using test data

c)

Testing only using random data

d)

Running the program without saving

13.

In the notes, a variable is described as:

a)

Data that never changes

b)

Store of data which changes during execution

c)

A label for output only

d)

A hardware register

14.

A constant is:

a)

A variable that is frequently updated

b)

Store of data that remains the same during execution

c)

A loop counter

d)

Only a string type

15.

Which data type is defined as “Single Character e.g. ‘a’, ‘Y’”?

a)

Integer

b)

Real

c)

Char

d)

Boolean

16.

Which pseudocode keyword is used to receive data from the user?

a)

PRINT

b)

READ

c)

DISPLAY

d)

SHOW

17.

Which pseudocode keyword is used to output data to the user?

a)

READ

b)

PRINT

c)

INPUT

d)

STORE

18.

How is a variable typically declared in the notes’ pseudocode?

a)

VAR VariableName

b)

DIM VariableName

c)

DECLARE VariableName DATATYPE

d)

CREATE VariableName

19.

A one-dimensional array is declared in pseudocode as:

a)

DECLARE Name ARRAY OF DATATYPE

b)

DECLARE Name ARRAY Lower Limit TO Upper Limit OF DATATYPE

c)

ARRAY Name DATATYPE

d)

MAKEARRAY Name

20.

Which selection structure is described as using IF…THEN…ELSE…ENDIF?

a)

Case structure

b)

Linear search

c)

Conditional statement

d)

Iteration

21.

Which loop always runs at least once?

a)

FOR…TO…NEXT

b)

WHILE…DO…ENDWHILE

c)

REPEAT…UNTIL

d)

CASE…OF…ENDCASE

22.

Which loop may not run at all if the condition is false initially?

a)

REPEAT…UNTIL

b)

FOR…TO…NEXT

c)

WHILE…DO…ENDWHILE

d)

Nested REPEAT

23.

The FOR…TO…NEXT loop is used when:

a)

The number of iterations is unknown

b)

The number of iterations is fixed/known

c)

Only one iteration is needed

d)

The loop must always run once

24.

Which of these correctly shows a comparison using a Boolean expression?

a)

IF Count THEN

b)

IF Total + 1 THEN

c)

IF Score > 50 THEN

d)

IF NAME STRING THEN

25.

Totalling is used in algorithms to:

a)

Count how many times a value appears

b)

Keep a running sum of values

c)

Find the maximum value

d)

Sort values

26.

Counting in an algorithm is mainly used to:

a)

Sum all the values

b)

Find minimum and maximum

c)

Record how many times an event occurs

d)

Reverse an array

27.

In the standard maximum algorithm, the first maximum value is usually set to:

a)

0 always

b)

The last item in the array

c)

The first item in the array

d)

A random value

28.

In the notes, a linear search:

a)

Starts in the middle of the list

b)

Uses binary splitting

c)

Inspects each item in sequence until found or list ends

d)

Needs the list to be sorted

29.

Bubble sort works by:

a)

Inserting each element into its correct place

b)

Selecting the smallest element and swapping

c)

Comparing and swapping adjacent elements repeatedly

d)

Splitting the list into two halves

30.

In bubble sort, after each pass:

a)

All items are sorted

b)

The smallest item is at the start

c)

The largest item in the pass moves to its correct position at the end

d)

The middle item is swapped

31.

Normal data is test data that:

a)

Is outside the allowed range

b)

Lies within the acceptable range of inputs

c)

Is always 0 and 1

d)

Is only text

32.

Abnormal data is:

a)

Within the valid range

b)

Used to check typical values

c)

Data that should be rejected if validation is correct

d)

Only boundary values

33.

Extreme data are:

a)

Values just outside the valid range

b)

The largest and smallest valid values

c)

Always negative

d)

Only string data

34.

Boundary data testing uses:

a)

Only one value at each end of the range

b)

Pairs of values: one just inside and one just outside the limit

c)

Only abnormal data

d)

Only typical data

35.

A trace table is used to:

a)

Store files on disk

b)

Document variable values step-by-step during a dry run

c)

Design flowcharts

d)

Draw network diagrams

36.

In a trace table, each column usually represents:

a)

A single test case only

b)

A variable or output to record changing values

c)

A separate algorithm

d)

A file name

37.

Validation checks are used to:

a)

Ensure data is entered twice

b)

Ensure data is reasonable before it is accepted

c)

Ensure data is copied correctly from one place to another

d)

Ensure passwords are encrypted

38.

A range check ensures:

a)

Data is the right length

b)

Data is of the correct type

c)

A value is between lower and upper limits

d)

A field is not empty

39.

A length check can be used to:

a)

Check if a number is positive

b)

Ensure data has a specific or reasonable number of characters

c)

Check if data is unique

d)

Check if input is numeric

40.

A type check verifies:

a)

That data is within a numeric range

b)

That the data matches the required data type

c)

That two inputs match

d)

That the string is the right length

41.

A presence check is used to:

a)

Ensure the value is not left blank

b)

Ensure the value is numeric

c)

Ensure the value is a date

d)

Ensure the value is unique

42.

A format check is used when:

a)

Checking that data is unique

b)

Data must follow a pattern, e.g. postcode format

c)

Counting records in a file

d)

Sorting a list

43.

A check digit is:

a)

A digit stored at the start of a code

b)

A digit calculated from other digits to verify the code

c)

A random number stored in a file

d)

A type of presence check

44.

Verification is mainly about:

a)

Checking if data is reasonable

b)

Checking if data has been copied correctly from one source to another

c)

Checking if the program runs fast

d)

Checking file sizes

45.

In double-entry verification:

a)

Data is entered twice and compared

b)

Data is entered once and encrypted

c)

Data is stored in two files

d)

Data is checked by a second program

46.

If a date of birth is typed twice and the computer checks the two entries match, this is:

a)

Validation only

b)

Verification by double-entry

c)

Presence check

d)

Length check

47.

Section E: Programming Concepts, Arrays, Procedures & Functions — A global variable is one that:

a)

Can only be used inside one procedure

b)

Is available to all parts of the program

c)

Must be a string

d)

Is read-only

48.

Section E: Programming Concepts, Arrays, Procedures & Functions — A local variable is:

a)

Available everywhere

b)

Only used inside the block where it is declared

c)

Stored permanently in a file

d)

Only used for arrays

49.

Section E: Programming Concepts, Arrays, Procedures & Functions — A one-dimensional array can best be described as:

a)

A single value

b)

A table with rows and columns

c)

A list of elements of the same data type under one name

d)

A set of unrelated variables

50.

Section E: Programming Concepts, Arrays, Procedures & Functions — A two-dimensional array is often described as:

a)

A stack

b)

A queue

c)

A table with rows and columns

d)

A single record

51.

Section E: Programming Concepts, Arrays, Procedures & Functions — Which pseudocode keyword is used to define a procedure?

a)

FUNCTION

b)

PROCEDURE

c)

MODULE

d)

METHOD

52.

Section E: Programming Concepts, Arrays, Procedures & Functions — A function is different from a procedure because it:

a)

Cannot have parameters

b)

Must always read files

c)

Returns a value to the main program

d)

Cannot be reused

53.

Section E: Programming Concepts, Arrays, Procedures & Functions — In pseudocode, what is used in a function to pass a result back?

a)

SEND

b)

EXIT

c)

RETURN

d)

END

54.

Section E: Programming Concepts, Arrays, Procedures & Functions — Library routines are:

a)

Pre-tested procedures/functions provided by the language

b)

Always written by the programmer

c)

Only used for file handling

d)

Only used for graphics

55.

Section E: Programming Concepts, Arrays, Procedures & Functions — Which library routine returns the remainder when one integer is divided by another?

a)

DIV

b)

RANDOM

c)

MOD

d)

ROUND

56.

Section E: Programming Concepts, Arrays, Procedures & Functions — Which routine returns the integer quotient of a division?

a)

DIV

b)

MOD

c)

ROUND

d)

RANDOM

57.

Section E: Programming Concepts, Arrays, Procedures & Functions — Which routine is used to round a real value to a given number of decimal places?

a)

RANDOM

b)

ROUND

c)

MOD

d)

DIV

58.

Section E: Programming Concepts, Arrays, Procedures & Functions — Which routine produces a value between 0 and 1 inclusive?

a)

DIV

b)

MOD

c)

RANDOM

d)

ROUND

59.

Which of the following is a characteristic of a stack data structure?

a)

First In First Out (FIFO)

b)

Dynamic resizing

c)

Random access to elements

d)

Last In First Out (LIFO)

60.

What is the primary purpose of a flowchart?

a)

To write code

b)

To visualize the flow of a program

c)

To debug a program

d)

To store data

61.

Which sorting algorithm has the best average-case time complexity?

a)

Quick Sort

b)

Bubble Sort

c)

Selection Sort

d)

Insertion Sort

62.

In object-oriented programming, what does encapsulation refer to?

a)

Creating multiple instances of a class

b)

Hiding the internal state of an object

c)

Defining a class without methods

d)

Inheriting properties from another class

63.

Which of the following is NOT a valid data type in most programming languages?

a)

Character

b)

String

c)

Pointer

d)

Integer

64.

What is the primary purpose of a loop in programming?

a)

To create a variable

b)

To store data

c)

To repeat a block of code

d)

To define a function

65.

Which of the following is a characteristic of a stack data structure?

a)

First In First Out (FIFO)

b)

Dynamic size

c)

Last In First Out (LIFO)

d)

Random access

66.

In programming, what does 'debugging' refer to?

a)

Testing software

b)

Compiling code

c)

Finding and fixing errors

d)

Writing code

67.

Which of the following is NOT a programming language?

a)

C++

b)

Java

c)

HTML

d)

Python

68.

What does an 'if' statement do in programming?

a)

Defines a function

b)

Checks a condition and executes code based on the result

c)

Declares a variable

d)

Repeats a block of code

69.

Which of the following is a common use of an array?

a)

To manage memory allocation

b)

To create user interfaces

c)

To perform mathematical calculations

d)

To store multiple values in a single variable

70.

What is the output of the following code: print(2 + 3 * 4)?

a)

20

b)

14

c)

17

d)

12

71.

Which of the following best describes a function in programming?

a)

A reusable block of code that performs a specific task

b)

A variable that holds data

c)

A method for sorting data

d)

A type of loop

72.

What is the primary purpose of a function in programming?

a)

To manage memory

b)

To store data

c)

To perform a specific task

d)

To create a user interface

73.

Which of the following is NOT a characteristic of an array?

a)

Dynamic resizing

b)

Indexed access

c)

Homogeneous data types

d)

Fixed size

74.

In programming, what does 'debugging' refer to?

a)

Finding and fixing errors

b)

Optimizing performance

c)

Writing new code

d)

Documenting code

75.

Which data structure uses LIFO (Last In, First Out) principle?

a)

Linked List

b)

Queue

c)

Array

d)

Stack

76.

What is the output of the following code snippet: print(2 + 3 * 4)?

a)

14

b)

17

c)

20

d)

12

77.

Which of the following is a valid way to declare a variable in Python?

a)

int x = 10;

b)

var x = 10;

c)

x = 10

d)

x := 10

78.

What does the term 'recursion' mean in programming?

a)

A method of sorting

b)

A loop that repeats

c)

A function calling itself

d)

A way to manage memory

79.

Which of the following is an example of a conditional statement?

a)

for loop

b)

if statement

c)

while loop

d)

function definition

80.

What is the primary purpose of a loop in programming?

a)

To create a user interface

b)

To define a function

c)

To store data

d)

To execute a block of code multiple times

81.

Which data structure uses key-value pairs?

a)

Array

b)

List

c)

Dictionary

d)

Stack

82.

In which scenario would you use a binary search?

a)

When the data is sorted

b)

When you need to count elements

c)

When the data is unsorted

d)

When you need to find the maximum value

83.

What does the acronym 'API' stand for?

a)

Automated Programming Interface

b)

Application Process Interface

c)

Advanced Programming Integration

d)

Application Programming Interface

84.

Which of the following is a characteristic of a stack data structure?

a)

First In First Out (FIFO)

b)

Last In First Out (LIFO)

c)

Random Access

d)

Dynamic Size

85.

What is the purpose of a function in programming?

a)

To create a loop

b)

To store data

c)

To perform a specific task

d)

To handle errors

86.

Which of the following is NOT a programming paradigm?

a)

Graphical

b)

Object-Oriented

c)

Functional

d)

Procedural

87.

What is the result of the expression 5 + 3 * 2?

a)

8

b)

16

c)

11

d)

10

88.

Which of the following is a common data structure used to store a collection of elements?

a)

Boolean

b)

Array

c)

String

d)

Integer

89.

What is the purpose of a flowchart in programming?

a)

To visualize the logic of a program

b)

To write code

c)

To store data

d)

To compile the program

90.

Which of the following is NOT a type of loop in programming?

a)

Until loop

b)

Do-while loop

c)

While loop

d)

For loop

91.

What does the acronym 'API' stand for?

a)

Automated Programming Interface

b)

Advanced Programming Integration

c)

Application Programming Interface

d)

Application Process Interface

92.

Which sorting algorithm is known for its efficiency in large datasets?

a)

Selection Sort

b)

Insertion Sort

c)

Quick Sort

d)

Bubble Sort

93.

What is the main purpose of a database?

a)

To store and manage data

b)

To perform calculations

c)

To create user interfaces

d)

To compile programs

94.

Which of the following is a characteristic of object-oriented programming?

a)

Sequential processing

b)

Global variables

c)

Encapsulation

d)

Static typing

95.

What is the purpose of a compiler in programming?

a)

To manage memory

b)

To debug programs

c)

To convert source code into machine code

d)

To execute code