Sie sind auf Seite 1von 9

Information Technology in FOCUS for CSEC

SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

Activity # 29 – a

TEST YOUR KNOWLEDGE


Chapter 29: Problem Solving and Programming – Computer Base

Examination based short answer questions


INSTRUCTION: Answer all questions.

1. Answer all the following questions using IPO Chart:


(i) Calculate the area of a living room to be carpeted. (5 marks)

Possible Solution:
INPUT PROCESSING OUTPUT
• Length •Area = Length * Width
• Width
•Area

(ii) Calculate the results of ten students and find the average. (5 marks)

Possible Solution:
INPUT PROCESSING OUTPUT
• Ten Students •Sum = Ten Students •Average
•Average = Sum / 10

(iii) Find the square of two numbers. (5 marks)

Possible Solution:
INPUT PROCESSING OUTPUT
• Number 1 •SQUARE = Number 1 *
• Number 2
•SQUARE
Number 2

2. Use the top down design to solve the following:


(i) Calculate and print the average mark received in a class of 100 students.
(5 marks)

Possible Solution:

1
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

INPUT PROCESSING OUTPUT


• 100 Students •Sum = 100 students Marks
Marks •Average
•Average = Sum / 100

3. Correctly explain the term Algorithm. (2 marks)

Possible Solution:
In computer science an algorithm is a step by step method of solving a problem. It is commonly
used for data processing, calculation and other related computer and mathematical operations.
An algorithm is also used to manipulate data in various ways, such as inserting a new data item,
searching for a particular item or sorting an item.

(i) List FIVE characteristics of an Algorithm. (10 marks)

Possible Solution:
 a valid input that is clearly outlined
 Unambiguous steps, must be specific
 Finite number of steps, steps must be limited
 Control flow. Must flow easily from one step to another
 A terminator or terminates after a finite number of steps are completed
 An appropriate Output within steps. The result of the solution must relate to the input

4. Correctly state the THREE forms of Algorithm. (3 marks)

Possible Solution:
a) Narrative
b) Pseudocode
c) Flowchart

5. Complete the following statements:

Possible Solution:

(i) Algorithm is a step by step method of solving a problem. It is commonly used for
data processing, calculation and other related computer and mathematical
operations.

2
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

(ii) a valid input that is clearly outlined.

(iii) Unambiguous steps, must be specific

(iv) Finite number of steps, steps must be limited

(v) Control flow. Must flow easily from one step to another

(vi) A terminates after a finite number of steps are completed

(vii) An appropriate Output within steps. The result of the solution must relate
to the input

TOTAL 35 MARKS

Activity # 30 - b
TEST YOUR KNOWLEDGE
Chapter 30: Problem Solving and Programming – Computer Base

Examination based short answer questions


INSTRUCTION: Answer all questions.

1. Define the term Narrative Algorithm. (1 mark)

Possible Solution:
Narrative is writing algorithms in plain English statements. These statements are written in
steps that are clear, precise and are easy to understand. This is similar to writing in the IPO
Chart .

2. Answer all the following in Narrative Algorithm:


(i) Calculate the area of a living room to be carpeted. (5 marks)

Possible Solution:

Step 1: Start
Step 2: Accept Length and Width
Step 3: Store Length and Width in Area
Step 4: Store result in Area
Step 5: Display Area
Step 5: Stop

3
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

(ii) Calculate the results of ten students and find the average. (5 marks)
Possible Solution:

Step 1: Start
Step 2: Accept ten students
Step 3: Store ten students in Sum
Step 3: Divide sum by 10
Step 4: Store result in Average
Step 5: Display Average
Step 5: Stop

3. Explain the term Pseudocode. (1 mark)

Possible Solution:
Pseudocode is an informal program description of a program. Pseudocode contains what is
called syntax. Pseudocode summarizes a program’s steps (or flow) but excludes underlying
details.

4. List THREE common characteristics of a Pseudocode. (3 marks)

Possible Solution:
 Statements are written in plain English
 Each instruction is written on a separate line
 Keywords (IF, ELSE, FOR, WHILE etc.)and indentation are used to signify particular control
structures
 Each set of instructions is written from top to bottom, with only one entry and one exit
 Groups of statements may be formed then given a name

5. Answer all of the following in Narrative Algorithm:


(i) Calculate and print the average mark received in a class of 100 students. (5 marks)

Possible Solution:

Step 1: Start
Step 2: Accept 100 students’ marks
Step 3: Store 100 students’ in Sum
Step 3: Divide sum by 100
Step 4: Store result in Average
Step 5: Display Average
Step 5: Stop
4
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

(ii) Find the square of two numbers. (5 marks)

Possible Solution:

Step 1: Start
Step 2: Accept Number 1 and Number 2
Step 3: Multiply Number 1 by Number 2
Step 4: Store result in SQUARE
Step 5: Display SQUARE
Step 5: Stop

6. Explain the following terms:


(i) Variable and constant. (2 marks)

Possible Solution:
In programming, a variable is a value that can change, depending on conditions or on
information passed to the program. Typically, a program consists of instructions that tell the
computer what to do and data that the program uses when it is running.

A constant is classified as a variable whose value cannot be changed once it has been assigned. For
example pi is equal to 3.124; 25 mm is equal to 1” (I inch).

(ii) Give an example of each. (2 marks)

Possible Solution:
Constant Variable Name Value in Pseudocode as:
Pi 3.142
Year 2014
Date of birth 03.5.82
Amount $100.00

7. Give TWO examples of Relational Operator and Boolean Logical Operators. (4 marks)

Possible Solution:
Operation Meaning RELATIONAL Operator
Greater than >
greater than or equal to >=
Less than <
less than or equal to <=

5
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

Not equal to <>


Equal =

A NOT (-) A A NOT (-) A


True False 1 0
False True 0 1

8. Complete the following table: (6 marks)

A B A OR B
1 1
1 0
0 0
0 0
Possible Solution:

A B A OR B
1 1 1
1 0 1
0 0 0
0 0 0

9. What does BODMAS mean? (1 mark)

Possible Solution:
The BODMAS is a rule of expression in mathematics. The acronym stands for:
a) B – Brackets
b) O – Order
c) D – Division
d) M – Multiplication
e) A – Addition
f) S–Subtraction

10. List the THREE control structures in a Pseudocode. (3 marks)

Possible Solution:
 Sequence
6
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

 Selection
 Iteration also called repetition

(i) Explain ANY TWO. (2 marks)

Possible Solution:
SEQUENCING
Sequence tends to refer to the order of executing statements. In sequencing, one of a number
of statements is executed depending on the condition of the program.

SELECTION
The selection statement is also called a conditional statement or a logic statement. This
statement in Pseudocode is used to make a decision between alternatives.

11. Explain the term Loop in an Algorithm. (1 mark)

Possible Solution:
A repetition statement is called a looping statement, iteration statement or simply a loop. It is
the process wherein a set of instructions or structures are repeated in a sequence, a specified
number of times or until a condition is met.

(i) List THREE types of Loops. (3 marks)

Possible Solution:
 FOR DO
 WHILE DO
 REPEAT UNTIL

12. State TWO alternative names for selection statements. (2 marks)

Possible Solution:
Conditional statement or a logic statement

13. Complete the following statements: (22 marks)

7
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

Possible Solution:

(i) Narrative is writing algorithms in plain English statements. These statements are written
in steps that are clear, precise and are easy to understand. This is similar to writing in
the IPO Chart .
(ii) The first Print is used to ask a user to enter data in an algorithm. Whenever, print is used
in this manner, it is called a Prompting Statement.
(iii) Print is also used to output information from an algorithm. By using Print in this manner,
it is called an output statement.
(iv) After writing the prompting statement, the next step is to accept the data entered. This
is where the Read statement comes in.
(v) a variable is a value that can change, depending on conditions or on information passed
to the program.
(vi) Numeric variable are variables whose values are numbers that can be changed. These
values are displayed in standard numeric format. For example, 23, 45, 4, 6, etc.
(vii) Character Variable are variables whose values are characters. These characters
can change and have a standard character format. For example A, D, a, num, c, C.
(viii) A constant is classified as a variable whose value cannot be changed once it has
been assigned.
(ix) A single character constant or character constant is a single alphabet, a single digit or a
single special symbol enclosed within single inverted commas.
(x) A string literal contains a sequence of characters enclosed in double quotation mark
symbols.
(xi) An integer is a whole number (not a fractional number) that can be positive, negative, or
zero.
(xii)A character is any letter, number, space, punctuation mark, or symbol that can be typed
on a computer.
(xiii) The term floating point is derived from the fact that there is no fixed number of
digits before and after the decimal point, i.e. the decimal point can float.
(xiv) A string is any series of text characters, such as letters, numbers, special
characters, and spaces or simply a group of alphanumeric characters.
(xv)Operators are special symbols which indicate that a certain process is carried out.
(xvi) A relational operator compares two operands or two variables to determine
whether one is greater than, greater than or equal to, less than, less than or equal to the
other
(xvii) The term Boolean generally means TRUE and FALSE. These are simply similar to
1's (for true) and 0's (for false).
(xviii) A truth table is a breakdown of a logic function by listing all possible values the
function can attain.
(xix) An arithmetic operator is a mathematical function that takes two operands and
performs a calculation on them.
8
Information Technology in FOCUS for CSEC
SECTION 2 OF SYLLABUS: CHAPTER 29: Problem Solving and Programming – Computer Based

(xx) Sequence tends to refer to the order of executing statements.


(xxi) Pseudocode is used to make a decision between alternatives.
(xxii) Repetition statement is the process wherein a set of instructions or structures
are repeated in a sequence, a specified number of times or until a condition is met.

TOTAL 73 MARKS

Das könnte Ihnen auch gefallen