Professional Documents
Culture Documents
L1 - Computers Programs
L1 - Computers Programs
Vinh Vo (Ph.D)
2 Algorithms
3 Exercises
Outline
2 Algorithms
3 Exercises
Overview of computers
Definition
A computer is a machine that can be programmed to carry out sequences
of arithmetic or logical operations (computation) automatically [wikipedia]
được lập trình để thực hiện các 1
cách chủ động
Computer components
Why do we program?
Programming
The process of using a language that a machine can understand in order to
get it to perform various tasks. Computer programming is how we
communicate with machines in a way that makes them function how we
need.
Computer program
A sequence or set of instructions in a programming language for a
computer to execute.
Outline
2 Algorithms
3 Exercises
Algorithms
Definition
a well-defined, systematic logical approach that comes with a step-by-step
procedure for computers to solve any given program.
Properties of algorithms:
effectiveness
definiteness
finiteness
generality
Representation of algorithms:
pseudocode
flowchart
Vinh Vo (EM@HUB) Lecture 1 - Programming overview January 29, 2023 11 / 20
Algorithms
Pseudocode
A plain language description of the steps in a computing process or an
algorithm. It is often written in a normal language which is intended for
human reading rather than machine reading [wikipedia].
Basic symbols:
input an
Start
integer
store the
integer into 𝑥
Yes
𝑥 < 0?
No 𝑥 = −𝑥
End output 𝑥
Outline
2 Algorithms
3 Exercises
Simple Equation: ax + b = 0
B B B B B
B B B B B
B B
Q&A B B
B B B B B
B B B B B