
ทบทวนเนื้อหาเรื่องการแก้ปัญหาด้วย Python
Quiz by juckanapong sumphatchaimongkon
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
ในภาษาไพทอน ฟังก์ชันใดใช้ในการแสดงข้อความออกทางจอภาพ
printf
print
echo
Output
30s - Q2
หากต้องการคอมเมนต์บรรทัดเดียว จะต้องใช้เครื่องหมายใด
*
\
//
#
30s - Q3
หากต้องการกำหนดตัวแปร n ให้เป็นชนิด integer ที่มีค่าเท่ากับ 5 จะต้องประกาศตัวแปรอย่างไร
int n = 5
n = 5
variable n = 5
var n = 5
30s - Q4
หากต้องการแปลงชนิดข้อมูลตัวแปร a ที่เป็นชนิด String ให้เป็น Integer จะต้องใช้คำสั่งใด
int(a)
StringToInteger(a)
StringToInt(a)
integer(a)
30s - Q5
ข้อใดต่อไปนี้เป็นคำสั่ง if ในภาษา Python ที่ถูกต้อง
if (a = 22)
if a 22 :
if (a => 10)
if a >= 10 :
30s - Q6
ถ้าต้องการใส่เงื่อนไขหลายๆ เงื่อนไข จะต้องใช้คำสั่งใดในการเพิ่มเงื่อนไขต่อจาก if
Elseif
else if
if else if
elif
30s - Q7
ข้อใดเป็นการประกาศฟังก์ชันที่ถูกต้อง
def Submit() :
function Submit()
def Submit
function Submit() :
30s - Q8
ข้อใดเป็นคำสั่งที่ถูกต้องในการวนลูป While ในภาษา Python
while(a < 10)
while loop a < 10 :
while loop a < 10
while a < 10 :
30s - Q9
กลุ่มคำสั่งการวนซ้ำไปเรื่อยๆ จนกว่าเงื่อนไขจะเป็นเท็จ ถึงจะออกจากการวนซ้ำ คือคำสั่งใด
While
Position
For
Repeat
30s - Q10
คำสั่งใดที่ใช้สำหรับสร้างเงื่อนไขแบบสองทางเลือก
if else
for
if elif
while
30s - Q11
ครูผู้สอนวิชาวิทยาการคำนวณ ฯ 2 มีชื่อว่าอะไร
ครูหอย
ครูปู
ครูปลา
ครูกุ้งสุดหล่อ
30s