Back to roadmap
2
Fase 2

Python untuk AI

Fundamental Python dari dasar hingga advanced untuk kebutuhan AI

12 lessons
~165 min baca

Daftar Materi

Fase 2 — Python untuk AI

Estimasi: 3 minggu (~60-90 jam) Prasyarat: Fase 1 selesai (mindset + setup environment) Tujuan: Setelah fase ini, Python jadi alat yang lancar di tanganmu — variabel, function, OOP, file I/O, error handling, plus library standar yang akan dipakai di seluruh fase berikutnya.


Filosofi Fase Ini

Python untuk AI bukan Python untuk web atau game. Yang penting:

  • Manipulasi data: list, dict, comprehension
  • Function dan scope — basis dari semua framework ML
  • OOP secukupnya — paham class cukup untuk pakai PyTorch/Hugging Face
  • File I/O & JSON/CSV — load/save data
  • Error handling — debugging adalah 50% kerjaan ML

Yang tidak terlalu fokus: GUI, multithreading complex, async lanjutan. Itu bisa dipelajari nanti kalau dibutuhkan.

Roadmap Fase 2

File Topik Estimasi
01-python-fundamentals.md Variabel, tipe data, operator 4 jam
02-control-flow.md if/else, while, for, break, continue 4 jam
03-functions.md Function, scope, lambda, args/kwargs 6 jam
04-data-structures.md List, tuple, dict, set, comprehension 8 jam
05-string-handling.md String, formatting, regex dasar 4 jam
06-oop.md Class, inheritance, dunder methods 8 jam
07-file-io-modules.md File, JSON, CSV, modules, package 6 jam
08-error-handling.md try/except, exception, debugging 4 jam
09-advanced.md Decorator, generator, context manager, type hints 8 jam
10-stdlib-tour.md os, pathlib, datetime, collections, itertools 4 jam
11-mini-projects.md 3 mini project untuk konsolidasi 8 jam
challenges.md Final challenge fase 2 4 jam

Total ~70 jam — sesuai durasi kelas Dicoding "Memulai Pemrograman dengan Python" (60 jam) plus exercise.

Cara Pakai

  1. Selesaikan kelas Dicoding dulu kalau kamu mau dapat sertifikat. Materi di sini melengkapi, bukan menggantikan.
  2. Kerjakan tiap file berurutan. Setiap file ada code example dan exercise.
  3. Setiap exercise di-commit ke GitHub. Folder projects/fase-2-python/ di repo dicoding-genai-prep.
  4. Tidak boleh skip OOP. PyTorch dan HuggingFace pakai class. Skip OOP = struggle di Fase 5+.

Aturan Coding

  • Tulis kode, jangan cuma baca contoh
  • Eksperimen di terminal Python (REPL)python di terminal, langsung coba
  • Pakai Jupyter Notebook untuk eksplorasi, pakai .py file untuk project nyata
  • Format pakai Black (sudah setup di Fase 1)
  • Naming: snake_case untuk variabel/function, PascalCase untuk class

📚 Referensi Belajar Fase 2

⭐ Wajib

Resource Tipe Harga
Corey Schafer — Python Tutorials 🎥 Video 🆓
Real Python 📖 Teks 🆓
Exercism — Python Track 💻 Interaktif 🆓
Resource Tipe Harga
Automate the Boring Stuff 📚 Buku online 🆓
freeCodeCamp — Python Full Course 🎥 Video (4.5 jam) 🆓
Kaggle Learn — Python 💻 Interaktif 🆓
"Python Crash Course" — Eric Matthes 📚 Buku 💰 ~$40
Complete Python Bootcamp (Udemy) 🎥 Course 💰 ~$15

🇮🇩 Indonesia

Resource Tipe Harga
Dicoding — Memulai Pemrograman dengan Python Course 🆓
Kelas Terbuka — Python (YouTube) 🎥 Video 🆓

Lihat daftar lengkap di RESOURCES.md


Mulai dari: 01-python-fundamentals.md