คำถามเกี่ยวกับโครงสร้างคำสั่ง if ใน Python
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
Somphop Inyu
Used 3+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Coding1 M4-6
Quiz
•
10th Grade
10 questions
แบบทดสอบก่อนเรียน วิทยาการคำนวณ ม.5
Quiz
•
10th - 12th Grade
10 questions
โครงงานคอมพิวเตอร์
Quiz
•
7th - 12th Grade
10 questions
แบบทดสอบก่อนเรียน การสร้างภาพเคลื่อนไหว ครั้งที่5
Quiz
•
10th - 12th Grade
12 questions
อินเตอร์เน็ต
Quiz
•
9th - 12th Grade
10 questions
ออกแบบและเทคโนโลยี ม.4 บทที่1
Quiz
•
10th Grade
10 questions
ความรู้เบื้องต้นเกี่ยวกับกราฟิกดีไซน์
Quiz
•
10th - 12th Grade
11 questions
ออกแบบเทคโนโลยี ม.4(กระบวนการเชิงวิศวกรรม)
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
