#3 Notasi Algoritma (Kalimat Deskriptif, Flowchart, dan Pseudocode)
Summary
TLDRThe script discusses various methods of algorithm representation, emphasizing three main approaches: descriptive sentences, pseudo-code, and flowcharts. It explains how algorithms are communicated through structured language in descriptive sentences and how pseudo-code uses simple programming structures for human readability. The script also covers the importance of flowcharts in visually representing the logical steps of an algorithm. Examples are provided for each method, illustrating how to write algorithms for calculating circle areas, determining even or odd numbers, and finding the maximum number among three inputs.
Takeaways
- π Algorithms are step-by-step procedures to solve problems and can be represented in various ways.
- π The first method to represent an algorithm is through descriptive sentences, using a specific language structure to explain the steps.
- π Descriptive sentences are easy to write but can be challenging to translate into programming languages.
- π Algorithms written descriptively are structured into three main parts: the title or header, the declaration or dictionary, and the description section.
- π’ In the declaration section, variables and constants are defined for use within the algorithm.
- π The description section contains the core of the algorithm, detailing the steps to solve the problem in a logical order.
- π¬ The second method of algorithm representation is pseudo-code, which uses simple programming structures but is intended for human readability.
- π Pseudo-code must be translated into a specific programming language syntax to be executed by a computer.
- π The third method is flowcharts, which visually represent the logical flow of an algorithm using symbols and arrows.
- π« Flowcharts should avoid unnecessary repetition and should be structured from top to bottom, starting with a start symbol and ending with an end symbol.
Q & A
What are the three main ways to represent an algorithm?
-The three main ways to represent an algorithm are descriptive sentences, pseudo-code, and flowcharts.
How is an algorithm described using descriptive sentences?
-Descriptive sentences present an algorithm in a structured language to explain the steps involved, such as using Indonesian or English to describe the process of checking if a given number is odd or even.
What are the three main parts of an algorithm written in descriptive sentences?
-The three main parts are the title or header, which includes the name of the algorithm and its specification; the declaration or dictionary part, where variables and constants are defined; and the description part, which contains the steps of the algorithm.
What is the benefit of using pseudo-code to represent an algorithm?
-Pseudo-code is beneficial because it is easier to translate into actual programming languages due to the correspondence between pseudo-code notation and programming language syntax.
How does pseudo-code differ from descriptive sentences in representing an algorithm?
-Pseudo-code uses a structured form of language that is closer to programming syntax, while descriptive sentences use everyday language to explain the steps of an algorithm.
What is a flowchart and how is it used in algorithm representation?
-A flowchart is a visual representation of the steps in an algorithm, showing the logical sequence and relationships between processes using symbols and arrows.
What are the basic rules to follow when creating a flowchart?
-The basic rules include avoiding unnecessary repetition of processes, ensuring the flow of processes is from top to bottom, and starting with a start symbol and ending with an end symbol.
What are the common symbols used in flowcharts and what do they represent?
-Common symbols include terminators for start and end, flow lines for direction, process symbols for calculations or data manipulation, input/output symbols for data handling, and decision symbols for conditional branching.
Can you provide an example of how a flowchart is used to determine if a number is even?
-In the example, the flowchart starts with an input symbol to enter a number, then uses a decision symbol to check if the number modulo 2 equals 0. If true, it prints 'even'; if false, it prints 'odd', both using output symbols.
What is the significance of the title or header section in an algorithm written in descriptive sentences?
-The title or header section is significant as it provides the name and a brief explanation or specification of what the algorithm does, setting the context for the rest of the algorithm's steps.
How does the declaration or dictionary part of an algorithm in descriptive sentences contribute to the algorithm's functionality?
-The declaration or dictionary part is crucial as it defines the variables and constants that will be used in the algorithm, ensuring that they are properly initialized before being utilized in the steps.
Outlines
π Understanding Algorithm Description
This paragraph introduces the concept of algorithms and their representation through descriptive sentences. It explains that algorithms consist of steps to solve problems and can be communicated in various ways. The paragraph highlights three main methods to describe an algorithm: descriptive sentences, pseudo-code, and flowcharts. It provides an example of a simple algorithm to check if a given number is odd or even using descriptive sentences. The paragraph also outlines the structure of a descriptive algorithm, which includes a title, explanation, input, and output. It emphasizes the importance of defining variables and constants before using them in the algorithm and describes the core part of the algorithm, which is the step-by-step problem-solving process.
π» Transitioning to Pseudo-Code
This paragraph delves into the second method of algorithm representation, pseudo-code. It clarifies that pseudo-code is a human-readable description of an algorithm that cannot be directly executed by a computer. To be understood by a computer, pseudo-code must be translated into a specific programming language's syntax. The paragraph explains that there is no official standard for pseudo-code, so it can be adapted to any programming language, with a recommendation to use common keywords. The benefits of using pseudo-code are discussed, particularly its ease of translation into actual programming languages due to the correspondence between pseudo-code and programming language syntax. The paragraph contrasts descriptive sentences with pseudo-code, showing how everyday language is adapted into a more structured format for programming. An example of pseudo-code for determining the maximum of three numbers is provided to illustrate the method.
π Flowcharting the Algorithm
The third method of algorithm representation discussed in this paragraph is the flowchart. Flowcharts are visual tools used to represent the logical flow of steps in a program. They consist of symbols that represent different processes and are connected by arrows indicating the order of operations. The paragraph outlines the basic rules for creating flowcharts, such as avoiding unnecessary repetition and ensuring a clear, top-to-bottom flow. It introduces various symbols used in flowcharts, including terminators for start and end, flow lines for direction, process symbols for computations, input/output symbols for data interaction, and decision symbols for conditional branching. An example flowchart for determining whether a number is even is provided, demonstrating the use of these symbols to visually represent the algorithm's logic.
π Wrapping Up Algorithm Representation
In conclusion, the paragraph summarizes the three methods learned for writing algorithms: descriptive sentences, pseudo-code, and flowcharts. It sets the stage for further learning about the basic structures of algorithms in upcoming materials. The paragraph ends with a farewell and blessings in Arabic, indicating the end of the current discussion.
Mindmap
Keywords
π‘Algorithm
π‘Descriptive Sentence
π‘Pseudo-code
π‘Flowchart
π‘Input/Output
π‘Conditional Statements
π‘Variables
π‘Constants
π‘Loops
π‘Functions
π‘Logic
Highlights
Algorithms consist of steps to solve problems and can be communicated in various ways.
There are three main methods to represent algorithms: descriptive sentences, pseudo-code, and flowcharts.
Descriptive sentences present algorithms in a structured language to explain the steps.
An example of a descriptive sentence algorithm is a program to check if a given number is odd or even.
Descriptive sentence algorithms are easy to write but can be challenging to translate into programming languages.
A descriptive sentence algorithm typically consists of a title, explanation, and three main parts: declaration, description, and output.
Pseudo-code is a structured description of an algorithm using simple programming language constructs intended for human readability.
Pseudo-code must be translated into a specific programming language syntax to be executed by a computer.
Pseudo-code uses common keywords like 'if', 'else', 'while', and 'for' for better translation into programming languages.
Flowcharts use diagrams to represent the logical flow of steps in a program.
Flowcharts consist of symbols representing processes, decisions, inputs, and outputs, connected by arrows indicating the flow of control.
Flowcharts should avoid unnecessary repetition and be designed to flow from top to bottom.
A flowchart begins with a start symbol and ends with an end symbol, with clear logic and decision points.
An example of a flowchart is determining whether a number is even, using input/output symbols and decision points.
The transcript discusses the importance of understanding different notations for writing algorithms, including descriptive sentences, pseudo-code, and flowcharts.
The session concludes with a summary of the learned material and a sign-off in Arabic, indicating the end of the discussion.
Transcripts
Hai Bu kalau algoritma itu ditulisnya
dalam bentuk kata-kata gini aja Bu
ada nggak sih cara lain buat ngegambarin
algoritma Bu ada dong
[Musik]
seperti yang kita ketahui bahwa
algoritma berisi langkah-langkah
penyelesaian masalah terdapat berbagai
bentuk cara untuk mengomunikasikan
algoritma secara umum Ada tiga cara yang
digunakan yang pertama adalah
kalimat deskriptif
di dalam bentuk ini agoritma disajikan
dalam bentuk kalimat dengan struktur
bahasa tertentu untuk Menjelaskan
langkah-langkahnya contohnya dengan
menggunakan bahasa Indonesia ataupun
bahasa Inggris
Hai misalnya kita akan membuat sebuah
program bilangan ganjil genap diberikan
sebuah bilangan bulat positif X untuk
dicek apakah termasuk bilangan ganjil
atau genap maka algoritma untuk membuat
program tersebut adalah jika x habis
dibagi dua maka tulis genap jika tidak
maka tulis ganjil Nah itu merupakan
contoh sederhana penulisan algoritma
menggunakan kalimat deskriptif cara
penulisan algoritma dengan notasi
kalimat deskriptif ini paling mudah
dilakukan namun begitu ah paling sulit
untuk diterjemahkan kedalam bahasa
pemrograman pada dasarnya teks algoritma
dengan bahasa deskriptif disusun atas
tiga bagian utama yaitu
yang pertama Bagian judul atau cedera
pada bagian ini terdiri atas nama
algoritma dengan penjelasan atau
spesifikasi dari algoritma tersebut
contohnya kita akan membuat sebuah
program cara menghitung luas dari sebuah
lingkaran maka dituliskan nama
algoritmanya beserta penjelasan ringkas
dari anggota tersebut spesifikasi dari
algoritma ini adalah menghitung luas
lingkaran untuk ukuran jari-jari
tertentu
algoritma menerima masukan dari
jari-jari lingkaran menghitung luas
lingkaran kemudian mencetak hasil
luasnya ke piranti keluaran itu
merupakan spesifikasi dari algoritma
untuk menghitung luas lingkaran
lalu yang kedua yaitu bagian deklarasi
atau kamus dalam algoritma bagian
deklarasi atau kamus ini digunakan untuk
mendefinisikan
sebuah nama yang dipakai di dalam
algoritma nama tersebut dapat berupa
nama variabel ataupun nama konstanta
semua nama tersebut baru dapat digunakan
dalam algoritma jika sudah didefinisikan
terlebih dahulu di bagian deklarasi
contohnya deklarasi untuk algoritma luas
lingkaran yang pertama ada variabel
jari-jari dengan tipe data Float artinya
nilai yang dimasukkan ke dalam variabel
jari-jarinya ini bisa berupa nilai
pecahan Kemudian yang kedua yaitu
variabel luar dengan tipe data Float
sehingga keluaran dari algoritma ini
dapat berupa bilangan pecahan yang
ketiga ada konstanta yaitu High dengan
nilai
3,4 belas bagian yang ketiga yaitu
bagian Deskripsi bagian ini merupakan
bagian inti dari struktur algoritma
bagian ini berisi urutan langkah-langkah
penyelesaian masalah langkah-langkah ini
dituliskan dengan notasi lazim dalam
penulisan algoritma setiap langkah
algoritma dibaca dari langkah paling
atas juga paling bawah contoh bagian
Deskripsi pada algoritma menghitung luas
lingkaran yaitu langkah yang pertama
baca jari-jari Kemudian yang kedua
hitung luas dengan menggunakan rumus phi
kali jari-jari kali jari-jari Dimana pi
bernilai 3,4 belas sedangkan jari-jari
sesuai dengan nilai yang telah dibaca
pada tahap sebelumnya kemudian yang
ketiga yaitu Tampilkan hasil luas ke
layar langkah pun sudah selesai
Nah itu dia cara penulisan algoritma
menggunakan kalimat deskriptif bagaimana
sudah mengerti sampai di sini
Sebelum kita lanjutkan yuk isi kuis
terlebih dahulu
Hai cara penulisan algoritma yang kedua
yaitu dengan menggunakan sedot sedot
atau bahasa semua berisi deskripsi dari
algoritma komputer yang menggunakan
struktur sederhana dari bahasa
pemrograman tetapi bahasa tersebut hanya
ditujukan agar dapat dibaca oleh manusia
sehingga notasi pseudo-code tidak dapat
dipahami oleh komputer
supaya notasi sedekat bisa dipahami oleh
komputer maka harus diterjemahkan
terlebih dahulu menjadi sintaks dari
bahasa pemrograman tertentu
dalam sedekat tidak ada syntax standar
yang resmi karena itu sedekat ini dapat
digunakan dalam bahasa pemrograman
manapun disarankan untuk menggunakan
keyword yang umum digunakan yaitu
seperti if dance El swidu lipid the poor
dan lainnya keuntungan menggunakan
notasi pseudo-code adalah kemudahan
dalam mentranslasi kedalam bahasa
pemrograman karena terdapat
korespondensi antara notasi sedekat
dengan notasi bahasa pemrograman
Nah sekarang Coba perhatikan
perbedaan antara notasi algoritma
menggunakan kalimat deskriptif dengan
subcord biasanya kalimat deskriptif ini
menggunakan kalimat yang seringkali kita
gunakan dalam kehidupan sehari-hari
misalnya di sini ada masukkan panjang
nah di dalam pedot kata masukkan diganti
bisa menjadi input Rich ataupun baca
input read baca ini memiliki arti yang
sama yaitu untuk masukkan kemudian ada
kalimat deskriptif Hai hitung luas
dengan rumus panjang kali lebar
nah bila didalam Seduh code kita
menuliskannya dengan dua kemudian panah
ke dalam panjang kali dengan menggunakan
notasi bintang lebar nah kemudian untuk
Tampilkan luwet itu di dalam sedot kode
bisa menggunakan kata output Luwes atau
print luas ataupun Freed luas ketiganya
ini memiliki arti yang sama yaitu untuk
menampilkan luas kemudian jika kita
memiliki algoritma
Jika nilai a lebih besar dari b maka
Tampilkan a Jika a lebih kecil dari b
maka Tampilkan B nah itu di dalam
kalimat deskriptif yang sangat mudah
kita cerna namun ketika diterjemahkan ke
dalam sedot atau kita menuliskannya ke
dalam sedot ini ditulis dengan
menggunakan
if yang berarti Jika a lebih besar
dengan menggunakan notasi lebih besar
dari
B kemudian than yang berarti maka print
a print abr arti cetak nilai a kemudian
Elf yang berarti Jika a tidak lebih
kecil dari b maka cetak b atau print B
Contoh notasi sedekat adalah sebagai
berikut Nah sekarang Coba perhatikan
contoh algoritma dengan menggunakan
notasi pseudo-code
disini terdapat judul kemudian
spesifikasi dan ada Deklarasi yang
hampir sama dengan penulisan.di kalimat
deskriptif namun perbedaannya ada pada
deskripsi misalnya di sini kita akan
membuat algoritma untuk menentukan
bilangan maksimum dari tiga buah
bilangan yang diinput nah perhatikan
deskripsinya langkah pertama yaitu Rid
bilangan satu bilangan 2 nah disini
Artinya kita masukkan bilangan 1 dan
bilangan 2 atau kita input bilangan 1
dan bilangan 2 kemudian
dicek IV yang berarti jika
bilangan satu lebih besar sama dengan
bilangan 2
Den atau maka bilangan satu ini dia
menjadi Max singa di sini Max merupakan
variabel baru yang diisi dengan bilangan
satu kemudian Elf nge-rap ketika kondisi
pertama tidak terpenuhi artinya bilangan
satu tidak lebih besar atau sama dengan
bilangan 2
maka bilangan 2 yang masuk ke dalam
variabel Mark telah ditentukan Apakah
bilangan satu atau bilangan 2 yang masuk
kedalam Max setelah itu masukkan
bilangan tiga yang kemudian akan dicek
IV atau jika bilangan tiga lebih besar
atau sama dengan Max maka dan bilangan
tiga layang masuk ke dalam variabel Mark
nah kemudian setelah ditentukan Apakah
bilangan satu bilangan 2 atau bilangan
tiga yang masuk kedalam mata kemudian
Tampilkan bilangan mach tersebut ke
layar
Hai
selanjutnya cara menuliskan algoritma
yang ketiga yaitu dengan flowchart
flowchart atau bagan alir digunakan
untuk menunjukkan aliran atau
langkah-langkah dalam suatu program
secara logis
flowchart terdiri dari gambar atau bagan
yang menunjukkan Urutan atau hubungan
antar proses beserta pernyataannya dalam
bentuk gambar atau simbol-simbol
tertentu yang telah disepakati
sedangkan diantara proses dihubungkan
dengan menggunakan garis
notasi algoritma flowchart ini paling
banyak digunakan untuk menggambarkan
sebuah algoritma
untuk membuat flowchart terdapat
kaidah-kaidah baku yang harus
diperhatikan dalam penyusunan flowchart
loh Apa itu Bu yuk cekidot
yang pertama hindari pengulangan proses
yang tidak perlu atau logika yang
berbelit Hai sehingga jalannya proses
menjadi singkat yang kedua jalannya
proses digambarkan dari atas ke bawah
dan diperjelas oleh tanda panah
dan yang ketiga sebuah flowchart diawali
dengan titik start dan diakhiri dengan n
nah ayo kita kenali terlebih dahulu
simbol-simbol yang ada di dalam loncat
Nah ini dia simbol-simbol yang digunakan
dalam pembuatan Flowchart setiap simbol
memiliki fungsi masing-masing
namun simbol yang akan sering kita
gunakan adalah simbol Terminator yaitu
digunakan untuk awalan dan akhiran
program kemudian ada simbol garis alir
yaitu untuk arah aliran program kemudian
ada proses yang biasanya digunakan untuk
proses perhitungan atau proses Khan data
kemudian ada input atau output data yang
menggunakan simbol jajargenjang nah
biasanya disini
dituliskan proses input atau output data
kemudian ada simbol description ini
digunakan untuk perbandingan pernyataan
atau penyeleksian data sehingga simbol
decision ini atau simbol pemilihan ini
biasanya terdiri dari dua garis alir
yaitu untuk aliran kru atau benar dan
untuk aliran Fals atau salah yang
memberikan pilihan untuk langkah
selanjutnya
contoh dari flowchart adalah sebagai
berikut Nah ini dia contoh dari
penggunaan notasi algoritma dengan
menggunakan touch di sini ada algoritma
untuk menentukan bilangan
genap maka flowchart diawali dengan
simbol Terminator yaitu mulai
kemudian Rid bilangan yang mana Ini
memasukkan bilangan sehingga simbol yang
digunakan adalah simbol input output
kemudian
bilangan mod 2 = = 0 gimana ini
merupakan decision atau pilihan
Hai yang mana akan bernilai true atau
benar dan volt atau salah
Hai sehingga ketika bilangan mode 2 = =
0 dan bernilai benar maka print genap
dengan menggunakan simbol input output
kemudian ketika bernilai salah
print ganjil hadits ini juga menggunakan
simbol input output karena Print ini
merupakan keluaran dari algoritma
kemudian setelah itu algoritma ditutup
dengan Terminator selesai
Nah itu tadi penjelasan mengenai notasi
algoritma dapat kita simpulkan bahwa
banyak Khali cara untuk menuliskan
algoritma
dan yang telah kita pelajari Ada tiga
cara yang pertama dengan menggunakan
kalimat deskriptif yang kedua dengan
menggunakan speedboat dan yang ketiga
dengan menggunakan flowchart pada materi
selanjutnya kita akan belajar tentang
struktur dasar algoritma sampai disini
dulu perjumpaan kita
Assalamualaikum warahmatullahi
wabarakatuh
5.0 / 5 (0 votes)