wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algorithm Design-Ch2-Y8-1

Total questions: 31

Worksheet time: 22mins

Name
Class
Date
1.

Which of the following is not a stage of the program development life cycle?

a)

Analysis

b)

Design

c)

Debugging

d)

Coding

2.

What is the process of selecting important information and ignoring irrelevant details in a problem called?

a)

Decomposition

b)

Abstraction

c)

Validation

d)

Verification

3.

Pseudocode is written in

a)

Python only

b)

A specific programming language

c)

Standard English

d)

Machine language

4.

Which type of validation check ensures input data falls within a specific range?

a)

Length check

b)

Type check

c)

Range check

d)

Format check

5.

What is the purpose of double entry in data processing?

a)

Data validation

b)

Data verification

c)

Data storage

d)

Data input

6.

Which error will cause a program to fail to run at all?

a)

Logic error

b)

Runtime error

c)

Syntax error

d)

Calculation error

7.

Which stage of program development involves creating flowcharts and pseudocode?

a)

Analysis

b)

Coding

c)

Design

d)

Testing

8.

The Chinese translation of "algorithm" is

(a)  

9.

Which keyword means “a set of rules to solve a problem”?

a)

Algorithm

b)

Variable

c)

Loop

d)

Structure

10.

Which of the following is NOT a flowchart symbol?

a)

Decision

b)

Terminator

c)

Input/Output

d)

Class

11.

A linear search is inefficient because…

a)

It uses recursion

b)

It searches items one by one

c)

It skips half the list

d)

It requires data to be sorted

12.

Keyword: Verification means…

a)

确保数据格式正确

b)

确保数据真实且一致

c)

计算平均值

d)

编写伪代码

13.

A trace table is used to…

a)

Design flowcharts

b)

Predict output line by line

c)

Fix hardware

d)

Store data permanently

14.

Bubble sort works by…

a)

Splitting the list in half

b)

Using binary search

c)

Swapping adjacent values

d)

Reversing the list

15.

A bubble sort stops when a full pass is made with no swaps.

a)

True

b)

False

16.

A logical mistake causing wrong output is a (a)   error.

17.

Which validation check would be most appropriate for checking if a password has at least 6 characters?

a)

Presence check

b)

Length check

c)

Type check

d)

Range check

18.

Which of the following is an example of a logic error?

a)

Missing a closing bracket

b)

Using = instead of == in Python

c)

Using “>” instead of “<”

d)

Typing PRNT instead of PRINT

19.

The purpose of a (a)   table is to track changes in variable values step by step.

20.

Pseudocode must follow the exact rules of the programming language it represents.

a)

True

b)

Flase

21.

The trace table will contain two columns: (a)   and Output.

22.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'A' be?

a)

1

b)

3

c)

5

d)

7

23.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'B' be?

a)

1

b)

3

c)

5

d)

7

24.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'C' be?

a)

1

b)

3

c)

8

d)

13

25.

Look at the Algorithm Below. In the corresponding Trace Table, what value should 'D' be?

a)

11

b)

13

c)

8

d)

1

26.

What is the purpose of using a Trace table?

a)

Planning before writing a program

b)

To help debug a program

c)

Check for spelling mistakes

d)

Understand the program more

27.

The trace table will contain three columns: n, (a)   , and Output.

28.

This loop will repeat (a)   times

29.

What are logic errors?

a)

An error that does not stop the code from executing

b)

When the logic gates are incorrectly connected

c)

An error where the logic doesn't make sense

d)

Code that does not give the desired output

30.

Syntax error, Logic error or this code is perfect?

a)

Another great program, it is all ok

b)

Syntax error

c)

Logic error

31.

Which loop loops a set number of times?

a)

for

b)

while

c)

infinite

d)

loopy