แบบทดสอบที่ 5 เรื่องการรับค่าในภาษาไพทอน (รายกลุ่ม)
Quiz
•
Computers
•
7th Grade
•
Practice Problem
•
Hard
นางสาวมูณีเราะห์ มะนุง
Used 4+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ข้อใดคือคำสั่งรับค่าในภาษา Python
int()
input()
print()
ipod()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
ค่าที่ได้เมื่อใช้ฟังก์ชัน input() จะเป็นข้อมูลชนิดใด
Integer / int
Float
String
ถูกทุกข้อ
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
จากโค้ดคำสั่งต่อไปนี้ ค่าของตัวแปร age เป็นข้อมูลชนิดใด
age = input("คุณอายุเท่าไหร่")
Integer / int
Float
String
ถูกทุกข้อ
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
จากโค้ดคำสั่งต่อไปนี้ จะเกิด Error หรือไม่ และเพราะเหตุใด
age = input("คุณอายุเท่าไหร่")
age = age + 20
Error เพราะผู้ใช้ไม่ระบุอายุ
Error ตัวแปร age เป็นชนิดข้อมูล String ทำให้ไปบวก 20 ไม่ได้
ไม่ Error แต่ผู้ใช้ต้องระบุอายุ
ไม่ Error รันผ่านได้ปกติ
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
จากโค้ดคำสั่งต่อไปนี้ ควรเติมคำสั่งใดที่บรรทัดที่ 2 เพื่อไม่ให้เกิด Error
1.age = input("คุณอายุเท่าไหร่")
2._______________________________
3.age = age + 20
age = int(age)
age = int(20)
age = int(input())
age = str(age)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
จากโค้ดคำสั่งต่อไปนี้ หากผู้ใช้ป้อนค่า 45.5 ค่าดังกล่าวจะถูกเก็บในตัวแปรใด
w = input("ระบุน้ำหนักของคุณ (ใส่ทศนิยมได้)")
ตัวแปร w
ตัวแปร input
ตัวแปร age
ข้อ 1 และ 2 ถูกต้อง
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
จากโค้ดคำสั่งต่อไปนี้ หากผู้ใช้ป้อนค่า 45.5 ค่าดังกล่าวจะเป็นข้อมูลชนิดใด
w = input("ระบุน้ำหนักของคุณ (ใส่ทศนิยมได้)")
Integer/int
String/str
Float
ผิดทุกข้อ
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
วิทยาการคำนวณ: การสืบค้น
Quiz
•
10th Grade
11 questions
สอบกลางภาค 1/2564 ว20298 คอมพิวเตอร์กราฟิก
Quiz
•
7th Grade
10 questions
แบบทดสอบหลังเรียน เรื่ง e-Signature
Quiz
•
University
10 questions
สอบปลายภาคเรียน2/64 วิทยาการคำนวณ
Quiz
•
9th Grade
11 questions
Programming basics
Quiz
•
10th - 11th Grade
13 questions
LENGUAJE C
Quiz
•
11th Grade
11 questions
Programming Quiz 1
Quiz
•
11th Grade
12 questions
หน่วยที่ 2 หลักการและความสำคัญของเครือข่ายคอมพิวเตอร์
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
