Algorithms and Programming
Introduction of Algorithms
Mangaras Yanu F.
2020
Steps of the
Day
Rules Of Introduction
Lecture Syllabus of Algorithms
Let’s Start
Rules of
Lecture
Description of Subject, Rules, References and Value
Description of
Subject
• Name of subject : Algorithm and and Programming
• Prerequisite : none
• Lecturer : Mangaras Yanu Florestiyanto
• SKS : 3 SKS (Divide into 2 Teoritics and 1 Practises)
Rules
Don’t be late to come in my classroom
Rules
Presence must be above 80%
Rules
Do all components of value
Rules
Don’t be CHEATING!!!
• Presence : 10%
Components of Value
• Homework : 20%
• Middle Test : 30 %
• Final Test : 40%
• Rinaldi Munir, Algoritma &
Pemrograman
• Inggriani Liem, Diktat Algoritma dan
References
Pemrograman
Syllabu
s
Before and After Middle Test
• Introduction of Algorithms
• Introduction of Data Type, value, and
naming/identifier
Syllabus of Subject
• Sequential Structure
• Branching Structure
• Middle Test
• Looping and Structure
• Procedure and Function
Syllabus of Subject
• One Dimension Array
• Two Dimension Array
• Final Test
Introduction Of
Algorithms
Definition and Example
Why We Must Study Algorithm?
What is the Definition of Problem?
Question or set of works that
must be done with human.
Algorithm and
Programming can
solve the
problems
Some Terms in Programming
• Program is implementation of ALGORITHM that
was made from one programming language.
• Programming language is notation that was used
in ALGORITHM NOTATION to communicate with
computers.
• Programmers are people who made the
programs with ONE OR MANY programming
languages.
Types of Programming Languages
• High Level
• Middle Level
• Low Level
Build the Program
• Problem Definition
• Requirements Analysis
• Build the algorithms
• Coding
• Testing and Debugging
• Maintenance
• Documentation
What is Algorithm?
Sequence of steps to solve
the problems.
Presentation ofofAlgorithm
Presentation Algorithm
DESCRIPTIVE ANALYSIS
FLOW CHART
PSEUDO CODE
Example of Descriptive Analysis
How to Make Scramble Egg:
• Pour oil into skillet.
• Heat oil.
• Break the eggs and pour into the hot oil.
• Fry it
• Serve on a plate
Example of Flow Chart
SYMBOL ACTIVITY
INPUT/OUTPUT
PROCESSING
DECISION
PROCEDURE/SUBROUTINE
Example of Flow Chart
SYMBOL ACTIVITY
FLOW LINES
START/TERMINATOR
ON PAGE CONNECTOR
OFF PAGE REFERENCE
Example of Flow Chart
Example of Pseudo Code
1 Algoritma Tambah_Nilai
2 {I.S.: Nilai kesatu dan kedua diinisialisasi}
3 {F.S.: Menghitung penambahan nilai kesatu dan kedua}
4
5 Deklarasi: {atau Kamus:}
6 a,b,c:integer
7
8 Algoritma:
9 a1
10 b2
11 ca+b
Ilustration of Exchange Value with
Variable
A B A B
Ilustration of Exchange Value with
Variable
B
A
B A
A C
A
C
Ilustration of Exchange Value with
Variable
A B
C
EXERCISE
Exercise 1
Turn the process of exchange value with variable
into:
• Descriptive Analysis
• Flow Chart
• Pseudo Code
Exercise 2
Make algoritm for exchange value without variable
(this case only suitable for integer) in:
• Descriptive Analysis
• Flow Chart
• Pseudo Code
Exercise 3
Make algoritm for basic arithmetic operation (add,
substract, multiply, and divide) in:
• Descriptive Analysis
• Flow Chart
• Pseudo Code