Run it! · Jalankan!
Start here
- A lesson is a list of short steps. Press Continue (the arrow at the bottom) for the next one.
- After the steps come tasks: code you change and run.
- Today you type very little. You change one small thing at a time.
Mulai di sini
- Satu pelajaran adalah daftar langkah pendek. Tekan Lanjutkan (panah di bagian bawah) untuk langkah berikutnya.
- Setelah langkah-langkah, ada tugas: kode yang Anda ubah dan jalankan.
- Hari ini Anda mengetik sangat sedikit. Anda mengubah satu hal kecil secara bertahap.
The buttons
- Run ▶ runs the code. What it prints appears in the dark box under it.
- Check answer tests your code. Green means correct, and you win coins.
- The lightbulb gives a hint when you are stuck.
- Reset brings the starting code back.
Tombol-tombol
- Jalankan ▶ menjalankan kode. Apa yang dicetaknya muncul di kotak gelap di bawahnya.
- Cek jawaban menguji kode Anda. Hijau berarti benar, dan Anda memenangkan koin.
- Bohlam memberikan petunjuk ketika Anda tersendat.
- Atur ulang mengembalikan kode awal.
print("I am an example. Press the play button to run me.")
When something goes wrong
- If the code has a mistake, Python stops and shows red text.
- Under the red text, a card explains the error in English and Chinese and tells you which line to look at.
- Mistakes are normal. Read the card, fix one thing, and run again.
Ketika terjadi kesalahan
- Jika kode memiliki kesalahan, Python berhenti dan menampilkan teks merah.
- Di bawah teks merah, sebuah kartu menjelaskan kesalahan dalam bahasa Inggris dan Tionghoa serta memberi tahu Anda baris mana yang harus dilihat.
- Kesalahan itu normal. Bacalah kartu tersebut, perbaiki satu hal, lalu jalankan lagi.
When a program waits for you
- Some programs ask a question with
input(). - Then a highlighted box appears: type here, then press Enter.
- Click the box, type your answer and press Enter. The program continues.
Ketika program menunggu Anda
- Beberapa program mengajukan pertanyaan dengan
input(). - Kemudian kotak yang disorot muncul: ketik di sini, lalu tekan Enter.
- Klik kotak tersebut, ketik jawaban Anda dan tekan Enter. Program akan berlanjut.
name = input("What is your name? ")
print("Nice to meet you, " + name)
Now you try
- Three small tasks. Change the code, press Run, then Check answer.
Sekarang Anda coba
- Tiga tugas kecil. Ubah kode, tekan Jalankan, lalu Cek jawaban.
This program is switched off: the # at the start makes the line a comment, so Python skips it. Delete the #, press Run ▶ to see what it prints, then press Check answer. · Program ini dimatikan: # di awal membuat baris tersebut menjadi komentar, sehingga Python melewatinya. Hapus #, tekan Run ▶ untuk melihat apa yang dicetak, lalu tekan Check answer.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.
Change one word so the program prints I like dogs. Only the text inside the quotes changes. · Ubah satu kata agar program mencetak I like dogs. Hanya teks di dalam tanda kutip yang berubah.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.
This program has a mistake. Press Run ▶ first and read the card under the red text: it explains the error. Then fix the line so the program prints Hello. · Program ini memiliki kesalahan. Tekan Run ▶ terlebih dahulu dan baca kartu di bawah teks merah: itu menjelaskan kesalahannya. Kemudian perbaiki barinya agar program mencetak Hello.
Click Run to see the output here. · Klik Jalankan untuk melihat output di sini.