0% found this document useful (0 votes)
0 views70 pages

Lesson 20

The document outlines the steps in problem solving, emphasizing the programmer's role in defining problems, formulating algorithms, and translating them into computer programs. It details the process from defining the problem to testing the program and running it with data. The document also includes exercises for comprehension and vocabulary related to the topic.

Uploaded by

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

Lesson 20

The document outlines the steps in problem solving, emphasizing the programmer's role in defining problems, formulating algorithms, and translating them into computer programs. It details the process from defining the problem to testing the program and running it with data. The document also includes exercises for comprehension and vocabulary related to the topic.

Uploaded by

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

Virtual University ENG 101

Lesson -20
Dr.Surriya Shaffi Mir
In today’s lesson you are going to read about Steps
in Problem Solving.

We will follow the usual pattern of reading


followed by comprehension exercises, scanning
for information vocabulary exercise and content
review exercises. This will be followed by
exploring the Cause Effect Relationship between
texts and working with language for Classifying
in English.
2
Steps in Problem Solving
Can a computer solve problems? Definitely not. It is a
machine that carries out the procedures which the
programmer gives it. It is the programmer then, who
solves the problems. There are a few steps that one
has to follow in problem solving:
Step 1. The programmer must define the problem
clearly. This means that he or she has to determine, in
a general way, how to solve the problem. Some
problems are easy, while others take months of study.
The programmer should always start by asking: ‘Do I
understand the problem?’ 3
Step 2 The programmer must formulate an
algorithm, which is a straightforward sequence of
steps of instructions used to solve the problem.
Constructing an algorithm is the most important part
of problem solving and is usually time-consuming.
An algorithm can be described by a flowchart, which
may be stated in terms of a sequence of precise
sentences, or a block diagram. The latter is a
diagrammatic representation of the sequence of events
to be followed in solving the problem. The
relationship between the events is shown by means of
a connecting arrow . A block diagram can show if
4
a process has to be repeated or if there are alternative
routes to be taken.
Step 3. The programmer must translate the
algorithm or flowchart into a computer program. To
do so, he or she writes detailed instructions for the
computer, using one of the many computer languages
available following the exact sequence of the
flowchart algorithm. The program is usually written
on coding sheets which have a specific format drawn
on them.
Step 4. The programmer must then keypunch the
program, or give the coding sheets to the keypunch
5
operator to do it. The program is either punched on
cards or entered into the computer at a terminal with a
visual display unit.
Step 5. The program must then be tested. To do
so, the computer operator puts the deck of cards in the
card reader and presses the ‘read’ button. This
transfers the information to the memory of the
computer. Next, a printout shows if the program
works or if it has errors (called bugs). If the
programmer is using a terminal instead of cards to
enter the instructions; it is possible, with the aid of a
few commands, to store the program in the memory
of the computer and get a printout. 6
Step 6. The last step is to add the data to the
program and run the job completely. The computer
will then perform the calculations necessary to solve
the problem. It will follow the instructions in the
program to the minutest details. Therefore, one can
say that the computer is a robot. It doesn’t think, but
simply does what it is told.

7
Exercises
1.Main idea
Which statement best expresses the main idea of the
text? Why did you eliminate the other choices?
1. Constructing an algorithm is the basic step
in solving a problem.
2. Solving problems becomes easier if certain
steps are followed.
3. The computer does what the programmer
tells it to do.
8
Exercise 1
1. Main idea
Which statement best expresses the main idea of the
text? Why did you eliminate the other choices?
T 1. Constructing an algorithm is the basic step
in solving a problem.
This is 1 of 6 steps to be followed in solving problems. It is a detail.
T 2. Solving problems becomes easier if certain
steps are followed.
3. The computer does what the programmer
tells it to do.
A characteristic of the computer and not a step that must be followed in solving problems
9
2. Understanding the passage
Decide whether the following statements are true or
false (T/F) by referring to the information in the text.
Then make the necessary changes so that the false
statements become true.
1. The computer is a great help to people
because it solves their problems.
2. All problems are equally difficult to
solve.
3. An algorithm is a sequences of
instructions used to solve a problem.
10
2. Understanding the passage
Decide whether the following statements are true or
false (T/F) by referring to the information in the text.
Then make the necessary changes so that the false
statements become true.
F 1. The computer is a great help to people
because it solves their problems.
Computer only helps solve the problems.
F 2. All problems are equally difficult to
solve.
Not all problems are of the same difficulty.
T 3. An algorithm is a sequences of
instructions used to solve a problem.
11
4. The most important part of problem
solving is defining the problem clearly.
5. Block diagrams cannot show
relationships.
6. Coding sheets are used for writing
programs.
7. Punched cards are the only way of
transferring the program to the
computer memory.
8. If the data is not added to the
program, the computer cannot
perform calculations. 12
F 4. The most important part of problem
solving is defining the problem clearly.
The most important part of problem solving is constructing an algorithm.
F 5. Block diagrams cannot show
relationships.
Block diagrams show relationships with arrows.
T 6. Coding sheets are used for writing
programs.
F 7. Punched cards are the only way of
transferring the program to the
computer memory.
The program can be punched on cards/entered into computer at a terminal with a VDU
T 8. If the data is not added to the
program, the computer cannot
perform calculations. 13
9. It is a good idea to test the program
before adding the data.
10. A computer is very intelligent. It is
capable of thinking.

14
T 9. It is a good idea to test the program
before adding the data.
F 10. A computer is very intelligent. It is
capable of thinking.
Machines are not capable of thinking. Programmers are.

15
3. Locating Information
Find the passages in the text where the following ideas
are expressed. Give the paragraph references.
…….. 1. Programs are usually written on certain
lined forms.
………2. A block diagrams can show a decisions with
two different outcomes.
………3. The programmer is the one who solves the
problems.

16
3. Locating Information
Find the passages in the text where the following ideas
are expressed. Give the paragraph references.
P.4
…….. 1. Programs are usually written on certain
lined forms.
P.3
………2. A block diagram can show a decision with
two different outcomes.
P.1
………3. The programmer is the one who solves the
problems.

17
………4. Even if the programmer is using a terminal
instead of cards, it is possible to get a
permanent copy of his program.
………5. Not all problems are of the same level of
difficulty.

18
P.6
………4. Even if the programmer is using a terminal
instead of cards, it is possible to get a
permanent copy of his program.
P.2
………5. Not all problems are of the same level of
difficulty.

19
4. Contextual Reference
Look back at the text and find out what the words in
bold typeface refer to.
1. It is a machine (l.1)……………..
2. which the programmer give it (l.2)…………..
….
3. who solves the problems (l.3)………….
…..
4. which may be stated (l.14)
…………….
5. The latter is a diagrammatic 20
4. Contextual Reference
Look back at the text and find out what the words in
bold typeface refer to.
1. It is a machine computer
(p.1)
…………….. procedures

2. which the programmer give it (p.1)…………..


programmer
….
flow chart
3. who solves the problems (p.1)………….
…..
blocked diagram
4. which may be stated (p.3)…………….
key punch the program
5. The latter is a diagrammatic 21
7. This transfers the information (l.32)…………….
8. or it it has errors (l.33)…………….
9. It will follow the instructions (l.40)…………….
10. does what it is told (l.42)…………….

22
7. This transfers the information reading cards
(p.6)…………….
through the card reade
8. or it has errors (p.6)…………….
program
computer
9. It will follow the instructions (p.7)…………….
10. does what it is told computer
(p.7)…………….

23
5. Understanding Words
Refer back to the text and find synonyms for the
following words:
1. construct (l.10)
……………………
2. takes a lot of time (l.13)……………………
3. exact (1.15)
……………………
4. mistakes (l.34)
……………………
24
5. Understanding Words
Refer back to the text and find synonyms for the
following words:
1. construct formulate
(p.3)
…………………… time consuming

2. takes a lot of time (p.3)……………………


precise

3. exact (p.3)
bugs
……………………
aid
4. mistakes (p.6)
……………………
25
Now refer back to the text and find antonyms for the
following words:
6. ambiguously (l.5)…………………..
7. specific (l.6)…………………..
8. partially (l.39)…………………

26
Now refer back to the text and find antonyms for the
following words.
clearly
6. ambiguously (p.2)…………………..
general
7. specific (p.2)…………………..
completely
8. partially (p.7)…………………

27
6. Word forms
First choose the appropriate form of the words to
complete the sentences. Then check the differences of
meaning in your dictionary.
1.Procedure, proceed, proceeding
a) The machine carries out the
………………………. which the
programmer gives it.
b) You should ……………………………….
with care when using a calculator.
28
6. Word forms
First choose the appropriate form of the words to
complete the sentences. Then check the differences of
meaning in your dictionary.
1. Procedure, proceed, proceeding
a) The machine carries out the
procedure
………………………. which the
programmer gives it.
proceed
b) You should ……………………………….
with care when using a calculator.
29
2. program, programmer, programmed,
programming
a) I would like to …………………in COBOL.
b) There were quite a few errors in
my………………………..
c) My calculator is ……………………. It
plays a tune on the hour.
d) Fortran is one of the many
……………………… languages available
on the market. 30
2. program, programmer, programmed,
programming
program
a) I would like to …………………in COBOL.
b) There were quite a few errors in
program
my………………………..
programmed
c) My calculator is ……………………. It
plays a tune on the hour.
d) Fortran is one of the many
programming
……………………… languages available
on the market. 31
e) Computer………………… is a new field of
study at the university.
F) He is a good ……………………… because
he always constructs algorithm for his problems.

32
programming
e) Computer………………… is a new field of
study at the university.
programmer
F) He is a good ……………………… because
he always constructs algorithm for his problems.

33
3. relationships, relate, related
a. The first two steps in your program are not
………………………. They are basically different.
b. In a flowchart the…………………………
between events is shown by means of connecting
arrows.
c. Assembler is one example of a
machine……………………………….

34
3. relationships, relate, related
a. The first two steps in your program are not
related
………………………. They are basically different.
relationship
b. In a flowchart the…………………………
between events is shown by means of connecting
arrows.

35
4. code, coding
a. Do you have any …………………………..
sheet left.
b. I have to …………………………. my
program.
c. Assembler is one example of a
machine………………………………..

36
4. code, coding
coding
a. Do you have any …………………………..
sheet left.
code
b. I have to …………………………. my
program.
code
c. Assembler is one example of a
machine………………………………..

37
5. printer, printing, print, printed
a. ………………………… your name and
address in block letters.
b. …………………………. Was introduced by
Gutenberg in Germany
c. The quality of the ………………………..
Output from a daisy wheel printer is superior to
that from a dot matrix.
d. …………………………provided a hard copy
of the results of data processing operations.
38
5. printer, printing, print, printed
a. Print
………………………… your name and
address in block letters.
Printing
b. …………………………. Was introduced by
Gutenberg in Germany
c. The quality of the printed
………………………..output from a daisy
wheel printer is superior to that from a dot matrix.
Printers
d. …………………………provided a hard copy
of the results of data processing operations.
39
7a Content Review
Try to think of a definition for each of these items
before checking them in the Glossary. Then
complete the following statements with the
appropriate words. Make sure you use the correct
form, i.e. singular or plural.
algorithm coding sheets flowchart
robot printout bugs

40
1. Special forms which are usually used for writing
programs are called ……………….
2. Another word for program errors
is……………..
3. A number of steps used in solving a program is
called an …………………..
4. A machine which is incapable of thinking but
follows instructions is called a
…………………..
5. A ………………………… is either a group of
exact sentences to solve a problem or a block
41
diagram.
1. Special forms which are usually used for writing
programs are called ………………. coding sheets

2. Another word for program errors


bugs
is……………..
3. A number of steps used in solving a program is
algorithms
called an …………………..
4. A machine which is incapable of thinking but
follows instructions is called a
robot
…………………..
flowchart
5. A ………………………… is either a group of
exact sentences to solve a problem or a block
42
diagram.
7b. Control review
Solving a problem is a process involving various
steps. Complete the following diagram to show the
sequence of these steps.

Define the Define the Define the


Problem Problem Problem
clearly clearly clearly

Define the Define the Define the


Problem Problem Problem
clearly clearly clearly

43
7b. Control review
Solving a problem is a process involving various
steps. Complete the following diagram to show the
sequence of these steps.

Define the formulate an translate the


algorithm algorithm into a
Problem computer
clearly flowchart programmer

keypunch the test the add the data,


program or key program, run the
it in at a terminal
correct the program
bugs
44
8. Focus Review
Focus On: Cause and effect/result
The following sentences were taken from the text on
‘Steps in Problem Solving’. While reading these
sentences, underline the cause once, the
effect/result twice, then circle the
causal-effect/result marker.
1. If the programmer is using a terminal instead of
cards to enter his instructions, he can, with the aid
of a few commands, store the program in the
memory of the computer and get a printout.
45
8. Focus Review
Focus on: Cause and effect/result
The following sentences were taken from the text on
‘Steps in Problem Solving’. While reading these
sentences, underline the cause once, the
effect/result twice, then circle the
causal-effect/result marker.
1. If the programmer is using a terminal instead of
cards to enter his instructions, he can, with the aid
of a few commands, store the program in the
memory of the computer and get a printout. 46
2. The computer will follow the instructions in the
program to the minutest details. Therefore, one
can say that the computer is a robot.

47
2. The computer will follow the instructions in the
program to the minutest details. Therefore, one
can say that the computer is a robot.

48
Classifying
The term ‘classification’ means to separate objects
from one another. The simplest classification divides
things into those that show groups of characteristics
that are shared and those that are not. For example,
one would not place fish and birds together in the
same class with trees. Classification usually goes
from general to specific and is essential in attempting
to make sense out of things around us.
Classification, then, is a process of bringing order out
of confusion by breaking down the general topic into49
its related parts in a logical way. Outlining is very
closely related to classification, because it
organizes information in a logical fashion, going
from general to specific, or from least important to
most important, or from specific to general.
1. From general to specific
There are several ways to expressing each of these
relationships. By focusing on the large or high-
level category and talking about its parts, that is,
from general to specific, the following expressions
can be used:
50
is is made up of
can be divided into is composed of
is of comprises
has consists of
includes
A general to specific classification will usually have
singular main verbs, unless two or more things are
being analysed simultaneously.
51
Examples
1. The CPU is divided into three parts: the control
unit the arithmetic-logical unit, and memory.
2. The CPU has three parts: the control unit, the
arithmetic-logical unit, and memory.
3. The CPU includes three parts: the control unit, the
arithmetic-logical unit, and memory.
4. The CPU is made up of three parts: the control
unit, the arithmetic-logical unit, and memory.
5. The CPU is composed of three parts: the control
unit, the arithmetic-logical unit, and memory. 52
6. The CPU consists of three parts: the control unit,
the arithmetic-logical unit, and memory.

53
2. From specific to general
A specific to general classification, what the smaller
(or lower-level) components make when they are
put together, usually has the following expressions:
are…. of constitute
make up may be
form can be
are classified as

54
A specific to general classification will have plural
verbs, because two or more lower-level categories
are the focus of classification.
Examples:
1. The control unit, the arithmetic-logical unit, and
memory are the three parts of the CPU.
2. The control unit, the arithmetic-logical unit, and
memory are the three parts that make up the CPU.
3. The control unit, the arithmetic-logical unit, and
memory are the three parts that form the CPU.
55
4. The control unit, the arithmetic -logical unit and
memory are the three parts that constitute the CPU.
5. The control unit, the arithmetic-logical unit, and
memory together are classified as the CPU.
N.B. The active/passive pairs such as made up and
make up are not interchangeable.

56
Example
The CPU is made up of the control unit, the
arithmetic-logical unit and memory (from general
to specific).
Not: ‘The CPU makes up the control unit, the
arithmetic-logical unit, and memory.’
Not: ‘The control unit, the arithmetic-logical unit,
and memory are made up of the CPU.’
Finally, understanding classification is important for
understanding and recognizing definitions.
57
A computer has four basic components: input,
processor, memory, and output. The CPU consists
of two parts: the ……………………………..
which directs and controls the signals and
commands inside the processor, and the
………………………….. unit which does the
arithmetic operations and the decision-making
operations. While the ………………………is
made up of a ………………………….., a
…………………………., a…………………….
and a………………………, the
……………………….. is composed of
……………….., a…………………. and 58
A computer has four basic components: input,
processor, memory, and output. The CPU consists
control unit
of two parts: the ……………………………..
which directs and controls the signals and
commands inside the processor, and the
arithmetic - logical
………………………….. unit which does the
arithmetic operations and the decision-making
control unit
operations. While the ………………………is
register decoder
made up of a …………, a ……………………….,
counter clock
a……………………. and a………………………,
ALU
the ……………………….. is composed of
registers
……………….., binary adder
a…………………. and
59
……………….., which compares information and
and makes decision based on the results of the
comparisons.
In a computer, internal memory or
…………………… refers to the storage location
inside the computer, whereas…………………….
refers to the storage embodied in the
peripherals………………….. can be divided into
three types:………………………….,
………………… and …………………
…………………, on the other hand, may be
grouped as ……………………………
60
circuitry
……………….., which compares information and
and makes decision based on the results of the
comparisons.
In a computer, internal memory or
primary memory
…………………… refers to the storage location
secondary memory
inside the computer, whereas…………………….
refers to the storage embodied in the
Primary memory
peripherals………………….. can be divided into
core
three types:………………………….,
chip bubble
………………… and …………………
Secondary memory on the other hand, may be
…………………,
sequential
grouped as ……………………………
61
(………………) or ………………….. (…………….)
The ………………………. devices can be either a
………………., a …………………, a…………….
or a
These devices enter the information into the
computer. After the processor has operated on it,
the ……………………. devices display the results
of the computations on either a ……………………
or a ………………………….., or store them on
tape or disk for future use.

62
tape
(………………) random access
or ………………….. disk
(…………….)
input
The ………………………. devices can be either a
card reader tape drive disk drive
………………., a …………………, a…………….
terminal
or a …………………...
These devices enter the information into the
computer. After the processor has operated on it,
output
the ……………………. devices display the results
printer
of the computations on either a ……………………
terminal
or a ………………………….., or store them on
tape or disk for future use.

63
Exercise 2
Using the diagram below, complete the paragraph that follows.
A computer system

Core Chip Bubble

CPU
Primary
Memory Processor
CPU

Control Arithmetic Logical


unit Unit

Register Decoder Counter Clock

Binary
Registers Circuitry
adder
64
Input Output

Card Tape Disk


Terminal Printer Terminal
reader driver drive

Secondary
memory

Sequential Random access

Tape Tape

65
A computer has four basic components: input,
processor,memory, and output. The CPU consists of two
parts: the_____________which directs and controls the
signals and commands inside the processor, and
the________ unit which does the arithmetic operations and
the decision making operations. While the _____is made up
of a _____, a_________, a ________, and a
____________,the__________ is composed of __________,
a _______and________, which compares information and
makes decisions based on the results of the comparisons.

66
A computer has four basic components: input,
processor,memory, and output. The CPU consists of two
parts: the Control unit which directs and controls the signals
and commands inside the processor, and the arithmetic-
logical which does the arithmetic operations and the decision
making operations. While the Control unit is made up of a
register, a decoder, a counter, and a clock,the_ALU_ is
composed of registers, a binary adder and Circuitry, which
compares information and makes decisions based on the
results of the comparisons.

67
In a computer, internal memory or _______ refers
to the storage locations inside the computer,
whereas______refers to the storage embodied in the
peripherals.__________ can be divided into three types:
____________ , ______________ and_______________ .
_______ on the other hand may be grouped as
_____________ ( _______) or _______ ( ________ ).
The __________ devices can be either a _________, a
______, a _______ or a ______________.

These Devices enter in information into the computer. After


the processor has operated on it, the ______ devices display
the results of the computations on either a ______ or a
__________, or store them on tape or disk for future use.
68
In a computer, internal memory or primary memory refers
to the storage locations inside the computer,
whereas secondary memory refers to the storage embodied in
the peripherals. Primary memory can be divided into three
types: core , chip and bubble .

Secondary memory ,on the other hand, may be grouped as


sequential ( tape ) or random access ( disk ).
The input devices can be either a card reader, a tape drive, a
disk drive or a terminal.

These devices enter information into the computer. After the


processor has operated on it, the output devices display the
results of the computations on either a printer or a terminal, or
store them on tape or disk for future use. 69
In today’s lesson you read about steps
in Problem Solving.
We followed the usual pattern of reading
followed by comprehension exercises, scanning
for information vocabulary exercise and content
review exercises. This was followed by
exploring the Cause Effect Relationship between
texts and working with language for
Classifying
in English.

With this we come to the end of this lesson. 70


ALLAH HAFIZ

You might also like