Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views3 pages

Sec 3 Cs Algorithms Rev Paper

The document is a revision paper that includes exercises on programming concepts such as subroutines, validation checks, and error types. It contains matching tasks, error identification, and pseudocode analysis, along with examples and explanations for data verification methods. Additionally, it includes problems related to ISBN check digits and a pseudocode algorithm for calculating average grades.

Uploaded by

Paul Eric Vitug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Sec 3 Cs Algorithms Rev Paper

The document is a revision paper that includes exercises on programming concepts such as subroutines, validation checks, and error types. It contains matching tasks, error identification, and pseudocode analysis, along with examples and explanations for data verification methods. Additionally, it includes problems related to ISBN check digits and a pseudocode algorithm for calculating average grades.

Uploaded by

Paul Eric Vitug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

REVISION PAPER

Name:

1. Draw a line to link each term with its most appropriate description.

Term Description

An individual section of code that can be used by


Subroutine 1 a
other programs

Library routine 2 b A short section of code within a program

A commonly used function that is available to a


Top-down design 3 c
programmer

A design process where an overall task is broken


Decomposition 4 d
down into smaller tasks

The process of breaking down large tasks into


Module 5 e
smaller tasks

Shows the task that have been broken down and


Structure diagram 6 f
how they relate to each other

Used to trace the values of variables through the


Pseudocode 7 g
execution of a program

Flowchart 8 h Text-based method of describing an algorithm

A way of representing the structure and flow of an


Dry run 9 i
algorithm

Paper-based run through of an algorithm or a


Trace table 10 j
program

[10]

2. Identify what type of error is given below. SYNTAX ERROR or LOGIC ERROR

________________________ a The line contains a spelling error

________________________ b Assigning wrong data type to a variable

________________________ c The line is incomplete

________________________ d Using unconditional loop

________________________ e The elements are in the wrong order

________________________ f Using the same variable name for different purposes


[6]
3. Match the following validation checks in the box to its correct description and give example to each validation
check.

Range check Presence check Type check


Lookup Length check Format check

a. Specifies that data entered must conform to a specific format


______________________
Example:

b. Specifies that data entered must be numerical data in a range


______________________
Example:

c. Specifies that data entered must be a certain number of characters long


______________________
Example:

d. Specifies that only a certain type of data can be entered


______________________
Example:

e. Makes sure that a field must have data entered in it


______________________
Example:

f. Providing the user with a drop-down list to select data.


______________________
Example:
[12]

4. Explain following ways to verify a data.

a. Double entry ________________________________________________________________________

b. Twin entry ________________________________________________________________________

c. Proofreading ________________________________________________________________________
[3]

5. Consider the ISBNs below.

a. Is the check digit in the ISBN-13 number 9781 1075 1869 2 correct? Show your solution below.

[4]
b. Is the check digit in the ISBN-13 number 9782 0537 0300 8 correct? Show your solution below.

[4]

6. This pseudocode checks the grades that are input and outputs the average of all grades.

total ← 0
count ← 0
WHILE count < 3:
INPUT (“Enter your grade”)
GET grade
total = total + grade
count = count + 1
END WHILE
average = total / count
PRINT (Average = “, average)

Use these data and complete the trace table to dry-run the algorithm.
Grades : 80 , 90 , 60 , 50 , 90 , 65 , 80 , 100 , 50

total count grade average

[4]

You might also like