Anda di halaman 1dari 59

Scratch for Beginner

For Teachers and Students

Bernardo Nugroho Yahya, PhD.


Professor at Industrial & Management Engineering
Hankuk University of Foreign Studies, Korea
Email: bernardo (at) hufs.ac.kr

Bernardo Nugroho Yahiya


Scratch for Beginner

• Introduction to Coding
• Logical Structure of Coding
• Scratch Installation
• Scratch Beginner : Tutorial
• Develop a simple game: Practice
• Summary
Introduction to Coding
What is coding?

▷ It is writing step-by-step instructions that tell the


computer what to do
▷ For example, withdraw money in the ATM:
○ Start
○ Insert ATM card
○ Input password
○ Select option – withdraw
○ Select amount – amount to withdraw
○ Get the money
○ Confirmation – receipt
○ Finish
What is coding?
Why coding?

http://brianaspinall.com/10-reasons-kids-should-learn-to-code/
Why coding?

https://www.primotoys.com/5-reasons-kids-learn-coding/
Coding is necessary in Korea
▷ As of 2018, South Korea had
the highest density of robot
workers in the world
according to an article in the
World Economic Forum.
▷ Human Task (71%) in
healthcare, infrastructure,
professional service
▷ Robot (or Machine) Task (29%)
▷ In 2022, it is expected that
62% would be performed by
machine (robot)

8
Coding is necessary in Korea
▷ SD (5 -6) minimal 17 jam
(dimulai 2019) untuk
pelajaran “Basic Software”
▷ SMP minimal 34 jam untuk
mata pelajaran “Information”
(wajib)
▷ SMA – mata pelajaran
“Information” adalah pilihan
umum (bukan khusus).

9
Recommended Coding Curriculum

https://conol.co.kr/21 10
Logical Structure of Coding
Logical Structure of Coding
▷ Sequence
○ Step by step by the
order
▷ Selection
○ There is a rule or
condition to determine
the next step
▷ Loop
○ There is a rule or
condition to iterate
the next step
Logical Structure of Coding
▷ Cara menggoreng telur
○ Ambil telur dalam kulkas
○ Siapkan wajan
○ Panaskan wajan
○ Tuangkan minyak
○ Pecahkan telur dalam wajan
dengan minyak yang telah
panas
○ Tunggu hingga telur matang
○ Angkat telur dari wajan
○ Telur siap dimakan
Logical Structure of Coding
▷ Tujuan: identifikasi moda transportasi
○ Mulai
○ Masukkan tujuan (contoh:
supermarket)
○ JIKA jarak > 1 km MAKA
■ Naik mobil
○ JIKA jarak <= 1 km MAKA
■ Jalan kaki
○ Selesai
Logical Structure of Coding
▷ Tujuan: Makan pizza hingga habis
○ Mulai
○ Hitung jumlah pizza (contoh x = 3)
○ Apakah x sama dengan 0?
■ Makan
■ x dikurangi 1
○ Pizza habis
○ Selesai
Scratch Installation
Scratch Installation https://scratch.mit.edu/download

▷ Dua (2) opsi dalam menjalankan aplikasi Scratch


○ 1. Online Scratch
○ 2. Offline Scratch
▷ Online Scratch
○ Jika tidak ada masalah dengan koneksi internet,
Online Scratch bisa menjadi pilihan
○ Jika ada kendala dengan koneksi internet, ada
baiknya memilih opsi Offline Scratch
https://scratch.mit.edu/
Scratch Installation
JOIN

▷ Online Scratch
▷ Jika pertama kali
menggunakan scratch,
silakan memilih “Join
Scratch”.
▷ Ikuti langkah2
selanjutnya hingga
selesai.
Scratch Web Editor
Scratch Installation

▷ Offline Scratch https://scratch.mit.edu/download

▷ Silakan download dari link berikut Pilihannya:


1. Windows
2. Mac OS
3. Chrome OS
4. Android
Scratch Installation - Offline
Jika komputer anda sesuai dengan requirement, Jika komputer anda TIDAK sesuai dengan
silakan download dan install (run the .exe file for requirement, silakan download edisi
Windows OS) sebelumnya dan install

21
Scratch Installation - Offline
Jika proses installation telah selesai, silakan jalankan program “Scratch Desktop”

▷ In some cases, you need to


install Adobe Air.
▷ https://get.adobe.com/air/ot
herversions/

22
Tutorial - Scratch Beginner
Scratch Basic Editor
Scratch Basic Editors
Everything about motion of objects

Everything about the appearance of objects

Everything about the sound of objects

Everything about the events of objects

Everything to control the objects

Everything about sensing of objects

Everything about control flow / arithmetic operators

Everything about variables

Everything about creating blocks


Ganti Bahasa
Click untuk Jalankan
Stop

26
Example

27
Basic Editor – Motion - Sequence

Move the object with 10 steps

Turn the object with 15 degree

Turn the object with 15 degree

Move the object to X and Y coordinate

28
Condition
Basic Editor - Selection
FALSE

Komponen yang digunakan

Condition

TRUE
Condition

Basic Editor - Selection


JIKA BENAR

Komponen yang digunakan


JIKA SALAH

Condition

JIKA BENAR

JIKA SALAH
Basic Editor – Repeat Motion

Komponen yang digunakan


Basic Editor – Repeat Motion (2)

(1)
Basic Editor – Repeat Motion
Hasilnya?
Komponen yang digunakan

Bagaimana jika ingin


mendapatkan hasil di
bawah ini?
Game
Tujuan:
- Kucing ambil semua apel
- Apel akan hilang setelah
diambil
Coding – Picking Apple

▷ 1. Siapkan perjalanan si kucing (Sprite)


▷ 2. Siapkan apel
▷ 3. Duplikasi apel

36
Coding - Picking Apple

▷ Siapkan perjalanan si kucing


Komponen yang digunakan Dalam Bhs Indonesia

Dalam Bhs Inggris


Coding - Picking Apple

Click untuk pilih gambar lain

38
Coding - Picking Apple

Pilih Apel

39
Coding - Picking Apple
- Buat Coding’nya untuk Apel
- Tekan Apel

40
Coding - Picking Apple

▷ Siapkan Apel - Buat Coding Apel ketika diambil

Komponen yang digunakan


Ganti “sprite1”

41
Coding - Picking Apple
- Buat Coding Apel ketika diambil

42
Coding - Picking Apple

▷ Duplikasi Apel - Tekan tombol mouse sebelah kanan


- Pilih “duplicate” untuk menambah apel

43
Coding - Picking Apple

- Jalankan kucing menuju ke apel

44
Coding - Picking Apple (Variation)

▷ Tambah Background
(1). click

(2). Pilih Background

Tambahkan Background

45
Coding - Picking Apple (Variation)

▷ Tambahan suara
Komponen Tambahan
yang digunakan

46
Game
Coding – Simple Maze

▷ 1. Membuat Backdrops
▷ 2. Menentukan tujuan
▷ 3. Mengatur perjalanan sprite
Coding – Simple Maze
Coding – Simple Maze
(2). Pilih warna. Untuk tutorial ini, buat garis warna hitam

Setelah selesai
(1). Pilih kotak menggambar, kembali
ke “Code”
Coding – Simple Maze

1. Ganti “Sprite” dengan bola


2. Tambahkan “Button3”
Coding – Simple Maze

▷ Click Button3
Komponen yang digunakan
Coding – Simple Maze

▷ Click Bola
UP RIGHT

DOWN LEFT
Coding – Simple Maze

▷ Click Bola Ganti warna hitam

Komponen yang digunakan


Coding – Simple Maze
Coding – Simple Maze

RUN the program.

Click UP, DOWN, RIGHT, LEFT button


57
Summary
• Introduction to Coding
• Logical Structure of Coding
• Scratch Installation
• Scratch Beginner : Tutorial
• Develop a simple game: Practice
• Summary
감사합니다

▷ 질문?

59

Anda mungkin juga menyukai