Search Header Logo

ข้อสอบก่อนเรียน หน่วยที่ 5 ชนิดข้อมูลสตริง (String)

Authored by นางสาวศรารัตน์ วรรณแจ่ม

Computers

University

Used 1+ times

ข้อสอบก่อนเรียน หน่วยที่ 5 ชนิดข้อมูลสตริง (String)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. การระบุข้อมูลประเภทข้อความต้องใช้รูปแบบคำสั่งอย่างไร

ก.     ระบุภายในเครื่องหมายคำพูดคู่ “Hello”  หรือภายในเครื่องหมายคำพูดเดี่ยว ‘World’

ข.      เครื่องหมายคำพูดที่ใช้จะต้องเปิด-ปิดแบบเดียวกัน

ค.     นอกจากนี้ยังสามารถใส่เครื่องหมายพิเศษภายในได้โดยขึ้นต้นด้วยเครื่องหมาย \ (ทับกลับข้าง)

ง.      ถูกทุกข้อ

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. ข้อใดเขียนคำสั่งประเภทข้อความ ไม่ถูกต้อง

ก.     print("I'm 9")

ข.      print('I'm 9')

ค.     print('I\'m 9')

ง.      print("I\'m 9")

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. กำหนดให้ a = input() มีค่าเท่ากับ 10  b = input() มีค่าเท่ากับ 100 เมื่อใช้คำสั่ง print(a+b) จะได้ผลลัพธ์ตรงตามข้อใด

ก.     10+100

ข.      110

ค.     10100

ง.      10 100

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. การแปลงชนิดข้อมูลจำนวนเต็มเป็นชนิดข้อมูลสตริงต้องใช้ฟังก์ชั่นใด

ก.     len()

ข.      Srt()

ค.     Str()

ง.      String()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. การเขียนคำสั่งให้แสดงจำนวนอักขระในข้อความใช้ฟังก์ชั่นใด

ก.     len()

ข.      count()

ค.     Str()

ง.      String()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

6.กำหนดให้ name = “Paul Phoenix” ถ้าใช้คำสั่ง len(name) จะได้คำตอบเป็นท่าไหร่

ก.     10

ข.      11

ค.     12

ง.      13

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. ถ้าใช้คำสั่ง print name[6] จะตรงกับตัวอักษรตัวใด

ก.     P

ข.      h

ค.     o

ง.      e

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers