1) Which is a loop structure? a) return b) for c) def d) if-else 2) What does 'return' do in a function? a) Defines function b) Starts loop c) Ends loop d) Returns value 3) How to return two values? a) return a b b) return a + b c) return a, b d) return (a) 4) What is a parameter? a) Loop variable b) Function input c) Return value d) String method 5) Which is a conditional statement? a) if b) def c) for d) while 6) What keyword defines a function? a) def b) return c) if d) loop 7) Which is not a loop? a) for b) while c) if d) do-while 8) What is a default parameter? a) Return type b) No value c) Loop counter d) Predefined value 9) How to call a function? a) function() b) return function c) call function d) def function 10) If a function is defined to return two distinct values, such as an integer and a string, and the result is assigned to a single variable, what will that variable contain? a) Only the first value (the integer), with the second value being discarded. b) Only the second value (the string), with the first value being discarded. c) A tuple containing both values, which allows the single variable to hold a sequence of multiple items. d) A list containing both values in the order they were returned.
0%
Control Structures and Functions in Python
แชร์
แชร์
แชร์
โดย
Ligonangel
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
เกมตอบคำถาม
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม