คำถามเกี่ยวกับโครงสร้างคำสั่ง if ใน Python

Quiz
•
Computers
•
10th Grade
•
Hard
Somphop Inyu
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
โครงสร้างพื้นฐานของคำสั่ง if ในภาษา Python มีรูปแบบการใช้งานอย่างไร?
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 Wayground
15 questions
Python Algorithm

Quiz
•
4th Grade - University
10 questions
Data Analytic Unit4

Quiz
•
9th - 12th Grade
10 questions
[ว31281 - 13] แบบทดสอบก่อนเรียน

Quiz
•
10th Grade
15 questions
สอบท้ายหน่วยที่ 4 วิทยาการคำนวณ 2 ม.2

Quiz
•
9th - 12th Grade
10 questions
การแก้ไขปัญหาด้วยคอมพิวเตอร์(บทที่2)

Quiz
•
10th Grade
10 questions
ทดสอบบทที่ 3 (อินเทอร์เน็ต)

Quiz
•
9th - 12th Grade
15 questions
คีย์ลัด Powerpoint

Quiz
•
5th Grade - Professio...
10 questions
คำสั่งสร้างเกม scrach

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade