Posts

Showing posts from October, 2024

Coding Lesson (continue on a new one)

Functions Dalam fungsi, variabel terbagi menjadi dua tipe. Local scope and global scope. Local adalah variabel yang menjadi satu tubuh dengan sebuah fungsi. Karena hal ini, variabel local tidak bisa digunakan di luar fungsi yang dibuat. Sedangkan, global adalah kebalikannya. Contoh: def get_pay(num_hours):     # Pre-tax pay, based on receiving $15/hour     pay_pretax = num_hours * 15   # After-tax pay, based on being in 12% tax bracket     pay_aftertax = pay_pretax * (1 - .12)     return pay_aftertax Dari fungsi di atas, pay_aftertax dan num_hours adalah local variabel yang tidak dapat digunakan diluar fungsi. Hal ini dikarenakan variabel tersebut hanya ada di dalam fungsi tersebut. Note: fungsi bisa digunakan dengan argumen yang banyak, bahkan bisa digunakan tanpa menggunakan argumen. Untuk membuat argumen yang banyak hanya perlu menambahkan perintah baru dalam fungsi yang ingin dijalankan. Ini adalah contoh fungsi tanpa argumen: def print_h...

Beasiswa New Zealand (continue on a new one)

Requirements : (UNDERGRADUATE): AUT Scholarship www.aut.ac.nz/scholarships  (This is the link to apply online). (POSTGRADUATE) MANAAKI requirements: Generally, to study for an undergraduate qualification, you must have at least: an overall IELTS score of 6.0 and no band less than 5.5 a TOEFL score of 80 on the internet-based test with a writing score of 21 an overall PTE Academic score of 50, with no communication skills score less than 42 a Cambridge Academic English (advanced) overall score of 169 with no bands less than 162. MANAAKI application: Confirm eligibility: Make sure you are eligible, if you are, you will get an eligible code. Register for a Manaaki Scholarship Account: This is the step where you will enter your eligibility code. Set the account. Submit application before closing date.