1) What is a namespace in Python? a) A type of loop b) A container that maps names to objects c) A function that stores variables d) A file containing all variable names 2) Which of the following is an example of a built-in namespace? a) Variables inside a function b) Variables declared at the top of a script c) Functions such as print() and list() d) Variables declared using the global keyword 3) Where does Python search for a variable first? a) Built-in namespace b) Global namespace c) Local namespace d) Parent namespace 4) In the following code, which variable has local scope? a) school_name b) year c) student_name d) None of the above 5) What is the main error in the following code? a) Syntax error b) interest is a global variable c) interest is used outside the function (local variable) d) All the above
0%
python namespace
แชร์
แชร์
แชร์
โดย
Aabdalgamal
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
เปิดกล่อง
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม