Call a function · เรียกฟังก์ชัน
Call a function
greet is already written for you. Call it with "Mia" so the program prints "Hello, Mia".
Writing def only describes the function — nothing happens until you call it by name with brackets: greet("Mia"). The call goes at the left margin, outside the def.
เรียกฟังก์ชัน
greet ถูกเขียนไว้ให้แล้ว เรียกมันด้วย "Mia" เพื่อให้โปรแกรมพิมพ์ "Hello, Mia"
การเขียน def เพียงแค่ อธิบาย ฟังก์ชัน — ไม่มีอะไรเกิดขึ้นจนกว่าคุณจะ เรียก มันโดยชื่อพร้อมวงเล็บ: greet("Mia"). การเรียกอยู่ที่ขอบซ้าย นอก def
greet is already written for you. Call it with "Mia" so the program prints "Hello, Mia". · greet ถูกเขียนไว้ให้แล้ว เรียกมันด้วย "Mia" เพื่อให้โปรแกรมพิมพ์ "Hello, Mia"
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่