1) What will this code print? a) PythonPython b) Python*2 c) Python2 d) Python 2) What is the main difference between a procedure and a function in Python? a) A procedure can return a value b) A function can return a value c) A function takes parameters d) A procedure takes parameters 3) Which keyword is used to define a function in Python? a) def b) define c) function d) func 4) What will this function return? a) 34 b) xy c) x + y d) 7 5) What is a parameter in a function? a) A variable returned by the function b) The value passed to a function c) The function name d) A placeholder variable inside the function definition 6) What is an argument in Python functions? a) The value you pass into a parameter when calling a function b) A variable inside a function c) The value returned by a function d) A loop condition 7) What will this code output? a) Hello b) Hello name c) Hello Sam d) Sam 8) What is the return type of this function? a) str b) bool c) int d) True 9) Which of these correctly defines a function with two parameters? a) def myFunc(a, b): b) def myFunc(a b): c) def myFunc(a + b): d) def myFunc(ab): 10) What will this code output? a) n b) 5 c) 55 d) 25
0%
Python Functions Quiz
แชร์
แชร์
แชร์
โดย
Karenahmed81
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
ชนะหรือแพ้แบบทดสอบ
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม