โครงสร้างพื้นฐานของคำสั่ง if ในภาษา Python มีรูปแบบการใช้งานอย่างไร?
คำถามเกี่ยวกับโครงสร้างคำสั่ง if ใน Python

Quiz
•
Computers
•
10th Grade
•
Hard
Somphop Inyu
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
if เงื่อนไข: # คำสั่งที่ต้องการให้ทำเมื่อเงื่อนไขเป็นจริง
if เงื่อนไข: # คำสั่งที่ต้องการให้ทำเมื่อเงื่อนไขเป็นเท็จ
if เงื่อนไข1: elif เงื่อนไข2: else:
if เงื่อนไข: # คำสั่งที่ต้องการให้ทำเมื่อเงื่อนไขเป็นจริง else: # คำสั่งที่ต้องการให้ทำเมื่อเงื่อนไขเป็นเท็จ
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การเยื้องบรรทัด (Indentation) เป็นสิ่งสำคัญในการเขียนโค้ด Python เพราะ?
ช่วยให้โค้ดมีขอบเขตของบล็อคคำสั่ง
ช่วยให้โค้ดมีความยืดหยุ่น
เป็นการเพิ่มความสวยงามให้กับโค้ด
ช่วยให้โค้ดทำงานได้อย่างถูกต้อง
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การใช้ : (Colon) หลังจากเงื่อนไขของคำสั่ง if, elif, และ else มีประโยชน์อย่างไร?
ช่วยให้โปรแกรมทำงานได้เร็วขึ้น
ช่วยให้โปรแกรมทำงานได้อย่างถูกต้อง
ช่วยให้โปรแกรมมีขอบเขตของบล็อคคำสั่ง
ช่วยให้โปรแกรมมีความยืดหยุ่น
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การใช้เงื่อนไขที่เหมาะสมในคำสั่ง if จำเป็นต้องใช้อะไร?
Float
Boolean expression
Integer
String
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ใน Python ใช้คำว่า elif แทนคำว่า?
Else or
Else
Else else
Else if
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การใช้ else ในคำสั่ง if ทำให้โปรแกรมครอบคลุมกรณีใด?
กรณีที่เงื่อนไขเป็นเท็จ
กรณีที่เงื่อนไขไม่เป็นจริง
กรณีที่เงื่อนไขเป็นจริง
กรณีที่เงื่อนไขไม่เป็นเท็จ
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การใช้หลายเงื่อนไขในคำสั่ง if สามารถใช้อะไรเพื่อรวมเงื่อนไข?
not
or
and
xor
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
แบบทดสอบหลังเรียน บทที่4

Quiz
•
10th Grade
10 questions
แบบทดสอบเรื่องการรับค่าในภาษาไพทอน (รายบุคคล)

Quiz
•
9th - 12th Grade
10 questions
ว30285-ทดสอบเรื่องคำสั่งแบบเงื่อนไข

Quiz
•
10th Grade
15 questions
การเขียนโปรแกรมเบื้องต้น ม.3

Quiz
•
9th Grade - University
10 questions
แบบทดสอบก่อน-หลังเรียน

Quiz
•
9th - 12th Grade
15 questions
การจัดการข้อมูลและสารสนเทศ (Data and Information Management)

Quiz
•
6th - 10th Grade
15 questions
Python

Quiz
•
6th Grade - University
15 questions
coding

Quiz
•
8th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University