Skip to content · ⁨ข้ามไปยังเนื้อหา⁩
English

Name a block of code

  • A function is named code you can use again and again.
  • Make one with def name(): and an indented body.
  • "Calling" the function by its name runs that code.
ไทย

ตั้งชื่อ blok โค้ด

  • ฟังก์ชัน (function) คือโค้ดที่มีชื่อซึ่งคุณสามารถใช้งานซ้ำได้
  • สร้างหนึ่งด้วย def name(): และ body ที่ย่อหน้า
  • การเรียกใช้ฟังก์ชันโดยใช้ชื่อของมัน จะทำให้โค้ดนั้น被执行。

Handout · ⁨เอกสารประกอบการเรียน⁩

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP