แบบทดสอบที่ 5 เรื่องการรับค่าในภาษาไพทอน (รายกลุ่ม)

Quiz
•
Computers
•
7th Grade
•
Hard
นางสาวมูณีเราะห์ มะนุง
Used 4+ times
FREE Resource
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
ผิดทุกข้อ
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
สอบเก็บคะแนน การเขียนโปรแกรมด้วยภาษา Python

Quiz
•
8th Grade
10 questions
แบบทดสอบก่อนเรียนหน่วยที่ 4

Quiz
•
12th Grade
10 questions
C_หน่วย 3

Quiz
•
12th Grade
10 questions
GoPython

Quiz
•
6th - 8th Grade
10 questions
python EP2 ม.2

Quiz
•
8th Grade
10 questions
แบบทดสอบก่อน-หลังเรียน

Quiz
•
9th - 12th Grade
10 questions
แบบทดสอบก่อนเรียน Kidbright

Quiz
•
9th Grade
10 questions
ชนิดข้อมูลในภาษาไพธอน

Quiz
•
10th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
24 questions
Flinn Lab Safety Quiz

Quiz
•
5th - 8th Grade
22 questions
Figurative Language

Quiz
•
7th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade