0% found this document useful (0 votes)
6 views5 pages

LN 3

The document discusses key aspects of computer programming including: 1. Programmers must optimize computer memory, time, and their own time to develop efficient programs. 2. Programs are written using specific programming language rules and syntax so the computer understands the instructions. 3. Flowcharts are used to graphically represent the input, processing, and output of an algorithm to help solve problems.

Uploaded by

matarabdullah61
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)
6 views5 pages

LN 3

The document discusses key aspects of computer programming including: 1. Programmers must optimize computer memory, time, and their own time to develop efficient programs. 2. Programs are written using specific programming language rules and syntax so the computer understands the instructions. 3. Flowcharts are used to graphically represent the input, processing, and output of an algorithm to help solve problems.

Uploaded by

matarabdullah61
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/ 5

LECTURE NOTES 3

• The efficiency of the computer relies on the effectiveness of the programmer.


• The computer must be told what to do. It needs a set of instructions, the
solution,in order to process data in the correct sequence and reach the desired
results.
• The solution becomes a program when it is coded into a computer language
during the final stages of programming.
• Programmers have three resources that they need to optimize for cost
effectiveness: computer memory, computer time, and programmer time.
• Because programs are larger and more complex, and need to be
completed in less time than ever before, today many programmers work together
on the same program.
• As a result, readability is now what’s most important.
• If the instructions are written according to the appropriate rules and they
correctly follow the syntax of the computer language, then the computer will
complete the task.
• Since the computer programming language does not use English, you have
to learn its language. For the computer to “understand’’ a message, it
requires instructions governed by specific rules depending on the
programming language that is used.
• Syntax refers to the rules governing the language.
• An error is called a bug. A bug must be found and corrected, a process
called debugging.
• Many bugs are a result of syntax errors, but some are logic errors.
• All syntax errors must be corrected before you execute and test your
program.
• Certain organizational tools will help you learn to solve problems on the
computer.
• Flowcharts show the input, the processing, and the output.
Flowcharts
• Flowchart is a graphical
representation of an algorithm.
• It makes use of symbols which
are connected among them to
indicate the flow of information
and processing.
• A flowchart shows the flow of the processing
from the beginning to the end of a solution.
• Flowlines indicate the direction of the data flow.
• A decision block has two exits, one for each
choice.

To develop efficient computer solutions to problems


1. Use modules—break the whole into parts, with each
part having a particular function.
2. Use the three logic structures to ensure that the
solution flows smoothly from one instruction to the next.
a. The sequential structure executes
instructions one after another in a sequence.
b. The decision structure branches to execute
one of two possible sets of instructions.
c. The loop structure executes a set of
instructions many times.
DECISION STRUCTURE

SEQUENTIAL STRUCTURE LOOP STRUCTURE

You might also like