0% found this document useful (0 votes)
247 views

COM - 113 - INTRO. Basic Program

This document defines key concepts in programming: 1) A computer program is a set of step-by-step instructions that directs a computer to solve a problem. There are two major types of programming: system programming which facilitates hardware use, and application programming which solves specific problems. 2) Good programs are reliable, maintainable, portable, readable and have good performance. Algorithms are step-by-step solutions to problems expressed in a finite number of steps. Flowcharts use standard symbols to visually represent algorithms. 3) An example algorithm calculates the average of five numbers and its Pascal code translation is provided. Key flowchart symbols and their meanings are listed in a table.

Uploaded by

Fidelis Godwin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
247 views

COM - 113 - INTRO. Basic Program

This document defines key concepts in programming: 1) A computer program is a set of step-by-step instructions that directs a computer to solve a problem. There are two major types of programming: system programming which facilitates hardware use, and application programming which solves specific problems. 2) Good programs are reliable, maintainable, portable, readable and have good performance. Algorithms are step-by-step solutions to problems expressed in a finite number of steps. Flowcharts use standard symbols to visually represent algorithms. 3) An example algorithm calculates the average of five numbers and its Pascal code translation is provided. Key flowchart symbols and their meanings are listed in a table.

Uploaded by

Fidelis Godwin
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

COM 113

INTRODUCTION TO PROGRAMMING
1a. Define a computer program

Answer

Computer program is a series of step by step instruction that provides solution to a particular
problem and direct the computer on what to do exactly, though a program is a set of instructions, but
the statement must be submitted to a computer as a unit to direct the computers behavior.

1b. List and explain the two major type of programming?

Answer

The major programming are :

i.System programming

ii. Application programming

1. System program are designed to facilitate the use of the hardware and to make the computer
system function efficiently and run quickly.
2. Application programming: This system is designed to solve a particular problem e.g. word
processing software, database application, desktop publishing application, web publishing
software, graphic tool etc.
2a. List and explain features of good program.
Answer
The features are as follows:
i. Reliability
ii. Maintainability
iii. Portability
iv. Readability
v. Performance
1. Reliability: By reliability, we mean that you should be able to depend on the program to
always do what it has being designed to do.
2. Maintainability: By this, we mean that you should be able to modify the program when the
need arises
3. Portability: the concept of portability in programming is that a program should be of being
transferable to a different computer platform with a minimum modification if at all
4. readability: A program should be easy for programmers to read and understand e.g.
readable program is easier to maintain.
5.Performance: A program that doesn’t carry out the expected task quickly and efficiently has
lost the performance aim. The aim is in designing a program. The program should execute
quickly and efficiently.
2b. What is High-level language?
Answer
High level language are machine independent. high level language is either procedure
oriented or problem oriented. high level language can also be classified as
i. Scientific oriented language
ii. Business oriented language
iii. Multi-purpose language
iv. Educational oriented langualges
v. Natural language
3a. What is Algorithm?
Answer
Algorithm is defined as a step by step procedure or solution to a given problem or task. in another
hand you can define algorithm as a prescribed set of idea, defined rules or instructions for the solution
of a problemina finite number of steps.
3b. Write algorithm to calculate the average of five numbers and translate it into a Pascal code
Answer
Algorithm to calculate the average of four number
Algorithm average
Declare
A, b , c , d , e , f Real
Execute
Input a, b , c ,d , e ,f ?
(a+b+c+d+e)/5
Output “f”=c,c
End average

The above pseudocode can be transformed into Pascal code

Pascal code

Program.Average (input,output)
Var a, b ,c , d, e, f real
Begin
Read (a,b,c,d,e).
F=(a+b+C+d+e)/2;
Writef=;f;
End.

4a. What is a flowchart?


Answer
A flowchart is a diagrammatic or pictorial representation of an algorithm. We have different types
of flowcharts which are as follows
i. Data flow diagram
ii. System flow charts
iii. Forms flow chart
iv. Program flowchart
v. Hierarchy or structure chart
vi. Hierarchy input processing output(HIPO) charts
4b. In a tabular form list seven symbols names and meaning of flowchart.
Answer

SYMBOL NAME MEANING

Oval Start/Stop

Rectangle Process

Diamond Decision

Parallelogram Input/output

Rectangle with double Predefined process or


Vertical bar modules

Curve sided Quad Document or printed output

Small circle Connector

You might also like