placeholder image to represent content

ทบทวนเนื้อหาเรื่องการแก้ปัญหาด้วย Python

Quiz by juckanapong sumphatchaimongkon

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
11 questions
Show answers
  • 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

Teachers give this quiz to your class