
แบบทดสอบหลังเรียน เรื่อง ตัวแปร ชนิดข้อมูล ฟังก์ชันรับค่า
Authored by Kru-Noosanee Hayeeyusoh
World Languages
7th Grade
Used 5+ times

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
การใช้ตัวแปร: ถ้าต้องการสร้างตัวแปรชื่อ score และกำหนดค่าให้กับ score เป็น 10 จะเขียนโค้ดอย่างไร?
score = 10
score == 10
score = '10'
score : 10
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การใช้ตัวแปร: ถ้าต้องการเปลี่ยนค่าของตัวแปร x จาก 5 เป็น 7 จะเขียนโค้ดอย่างไร?
x += 7
x = 5
x = 10
x = 7
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ชนิดข้อมูล: ชนิดข้อมูลที่ใช้เก็บตัวเลขทั้งเต็มและทศนิยมคือชนิดข้อมูลอะไร?
integer
string
float
boolean
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ชนิดข้อมูล: ถ้าต้องการเก็บข้อความในตัวแปรชื่อ name จะใช้ชนิดข้อมูลอะไร?
float
boolean
integer
string
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ชนิดข้อมูล: ถ้าต้องการเก็บค่าจริงหรือเท็จในตัวแปรชื่อ is_valid จะใช้ชนิดข้อมูลอะไร?
string
float
integer
boolean
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การแปลงชนิดข้อมูล: เมื่อต้องการแปลงค่าตัวแปร x จากชนิดข้อมูลจำนวนเต็มเป็นชนิดข้อมูลทศนิยมจะใช้ฟังก์ชันอะไร?
str(x)
int(x)
float(x)
bool(x)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
การแปลงชนิดข้อมูล: เมื่อต้องการแปลงค่าตัวแปร y จากชนิดข้อมูลทศนิยมเป็นชนิดข้อมูลจำนวนเต็มจะใช้ฟังก์ชันอะไร?
bool()
int()
float()
str()
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?