1) Operators used to compare values such as: ==, >, <, <=, >=, != a) Relational operator b) Logical operator 2) Operators which result in either true or false such as: or and not a) Relational operator b) Logical operator 3) Combines else and if, allows you to add more than one a) If statement b) Elif statement 4) Selection/decision statement used to choose the code blocks to run a) If-else statement b) If statement 5) A reference to a location in memory for data storage a) Variable b) Data type 6) Can we write if/else into one line in python? a) Yes b) No c) if/else not used in python d) None of the above 7) What is the result of the condition passed in the if block in Python? a) “Boolean Output” b) Numerical Output” c) ”Both based on the scenario” d) ”None of these” 8) What keyword would you use to add an alternative condition to an if statement? a) else if b) elseif c) elif d) None of the above 9) Which one of the following is a invalid Python if statement : a) if a>=2 : b) if (a >= 2): c) if (a => 22): d) none of the above: 10) Does python have switch case statement? a) True b) False c) Python has switch statement but we can not use it. d) None of the above
0%
Python If statements
แชร์
แชร์
แชร์
โดย
Nn87
แก้ไขเนื้อหา
สั่งพิมพ์
ฝัง
เพิ่มเติม
กำหนด
ลีดเดอร์บอร์ด
แสดงเพิ่มขึ้น
แสดงน้อยลง
ลีดเดอร์บอร์ดนี้ตอนนี้เป็นส่วนตัว คลิก
แชร์
เพื่อทำให้เป็นสาธารณะ
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานโดยเจ้าของทรัพยากร
ลีดเดอร์บอร์ดนี้ถูกปิดใช้งานเนื่องจากตัวเลือกของคุณแตกต่างสำหรับเจ้าของทรัพยากร
แปลงกลับตัวเลือก
เกมตอบคำถาม
เป็นแม่แบบแบบเปิดที่ไม่ได้สร้างคะแนนสำหรับลีดเดอร์บอร์ด
ต้องลงชื่อเข้าใช้
สไตล์ภาพ
แบบ อักษร
ต้องสมัครสมาชิก
ตัวเลือก
สลับแม่แบบ
แสดงทั้งหมด
รูปแบบเพิ่มเติมจะปรากฏเมื่อคุณเล่นกิจกรรม
เปิดผลลัพธ์
คัดลอกลิงค์
คิวอาร์โค้ด
ลบ
คืนค่าการบันทึกอัตโนมัติ:
ใช่ไหม