ทดสอบความรู้ในการสร้างและเรียกใช้ฟังก์ชันใน Python

MajesticNurture avatar
MajesticNurture
·
·
Download

Start Quiz

Study Flashcards

5 Questions

ฟังก์ชันคืออะไร?

กลุ่มคำสั่งที่รวมตัวอยู่ภายใต้ชื่อเรียกหนึ่ง

การส่งค่าให้ฟังก์ชันสามารถทำได้ผ่านอะไร?

Parameter ของฟังก์ชัน

Parameter ของฟังก์ชันคืออะไร?

ตัวแปรที่อยู่ในวงเล็บของฟังก์ชัน

ฟังก์ชันส่งค่ากลับมาได้ผ่านคำสั่งใด?

return

ตอนเรียกฟังก์ชันจะต้องใส่อะไรให้ครบตามที่ฟังก์ชันกำหนด?

Parameter

Study Notes

ฟังก์ชัน

  • ฟังก์ชันคือการดำเนินการบางอย่างที่สามารถเรียกใช้ซ้ำได้และได้รับค่ากลับมา

การส่งค่าให้ฟังก์ชัน

  • สามารถส่งค่าให้ฟังก์ชันผ่าน parameter ได้

Parameter ของฟังก์ชัน

  • คือค่า input ที่ส่งให้ฟังก์ชันเพื่อใช้ในการคำนวณหรือดำเนินการบางอย่าง

การส่งค่ากลับมาจากฟังก์ชัน

  • ฟังก์ชันสามารถส่งค่ากลับมาได้โดยใช้คำสั่ง return

การเรียกฟังก์ชัน

  • ต้องใส่ parameter ให้ครบตามที่ฟังกนที่กำหนดไว้เพื่อหลีกเลี่ยงข้อผิดพลาด

ทำควิซเพื่อทดสอบความรู้ในการสร้างและเรียกใช้ฟังก์ชันในโปรแกรม Python

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

C++ Function Output and Keyword Purpose
6 questions
C Programming Input/Output Functions
10 questions
Functions in Programming
10 questions

Functions in Programming

StreamlinedAntigorite9796 avatar
StreamlinedAntigorite9796
Use Quizgecko on...
Browser
Browser