Lecture 01 Introduction
Lecture 01 Introduction
Introduction
1
Course Contents
• Introduction to computer languages.
2
Today
• The Computer
• Computer components
• Programs
• Writing a program
• Flow Charts
3
The Computer Computer Components
• is a tool • Central Processing Unit (CPU)
– the computer brain and main
worker
• varies in size, shape, speed,
capacity, and usage
• Memory
– where the computer stores the
• fast needed information
• Input devices
• does only what it is instructed
– devices to receive input from
to do user (e.g., keyboard, mouse)
• Output devices
– show results to the user (e.g.,
monitor, printer)
4
Programs
• Program
– A solution to a given problem written in a
computer programming language
• Software
– The collection of programs that run in a computer
and determine the operations that are valid in the
computer
5
Flow Charts
A flowchart is a type of diagram that represents an algorithm or process,
showing the steps as boxes of various kinds, and their order by connecting
these with arrows. This diagrammatic representation can give a step-by-
step solution to a given problem. Process operations are represented in
these boxes, and arrows connecting them represent flow of
control. Flowcharts are used in analyzing, designing, documenting or
managing a process or program in various fields.
6
• Unconditional transfer
• Input or output
• Processing
• Conditional transfer
• Loops ( conditional or
counted)
7
Writing a Program
1. Analysis
Understand the problem). Analyse the problem and break it into smaller
pieces
2. Design
Write step by step solution
3. Implementation
Write the code (the actual program in a computer language)
4. Testing
Test that the program and see if it works
Fix the errors that you discover during testing
8
Home Flow Chart Exercises
Draw a flow chart for each of the flowing procedures:
9
10