Computer Programming: Instructor: Junaid Rashid Lab 1: Introduction To Computer Programming
Computer Programming: Instructor: Junaid Rashid Lab 1: Introduction To Computer Programming
2. Output unit
“Shipping” section
Takes information processed by computer
Places information on output devices
Screen, printer, networks, …
Information used to control other devices
Six logical units of computer
3. Memory unit
Rapid access, relatively low capacity “warehouse” section
Retains information from input unit
Immediately available for processing
Flowchart
Program
Algorithm & Pseudo code
Step by step procedure to solve a problem is called an algorithm
Properties:
The giving problem should be broken down into simple and
meaningful steps.
The steps should be numbered sequentially.
The steps should be descriptive and written in simple English.
There is no standard to write a pseudo code.
Pseudo is separating it into two main parts.
Logic Design
Coding
Logic Design & Coding
Logic Design:
In this part the logic of the program is designed. We specify the
different steps required to solve the problem.
Coding
In this part the algorithm is converted into a program.
The steps of algorithm are translated into instructions of any
programming language.
Example:
Start
The start or end of a Process or action. Data: Inputs to, and outputs
workflow. from, a process.
Off Page
Manual Connector
Connector
Input
The pseudo code from the previous slide would look like this as a
flowchart:
Start
Print answer
Get 2 numbers
End
Add them
Another Sample: Calculating Age
Pseudo code:
Start
Get yr
Flowchart
Start Calc age