

ภาษาไพทอน
Presentation
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
นางสาวจิตติรัตน์ เจ๊ะอารง
Used 1+ times
FREE Resource
9 Slides • 10 Questions
1
ภาษา Python
By นางสาวจิตติรัตน์ เจ๊ะอารง
2
3
Multiple Choice
ภาษา python แปลภาษาในลักษณะใด
อ่านโค้ดคำสั่งมาบรรทัดหนึ่ง แล้วก็ทำงานให้ผลออกมา
ตรวจสอบความผิดพลาดของโค้ดคำสั่งตั้งแต่ต้นจนจบก่อน
แปลภาษาทีละบล็อก แล้วสั่งทำงาน
ไม่มีข้อใดถูก
4
5
Multiple Choice
ข้อใดเป็นข้อดีของภาษา python
เป็นภาษาสคริปต์
ไวยากรณ์อ่านง่าย
สามารถเรียกใช้ภาษาโปรแกรมอื่น ๆ ได้หลายภาษา
ถูกทุกข้อ
6
การแสดงผลโดยใช้ตัวแบ่งแต่ละบรรทัด
7
Multiple Choice
ข้อใดคือผลลัพธ์ที่ได้จากการ run โปรแกรมต่อไปนี้
name = "Anna"
age = 17
print(name, end=' ')
print(age)
8
การจัดรูปแบบการแสดงผลด้วย format string
9
10
การจัดรูปแบบการแสดงผลข้อมูลร่วมกับฟังก์ชันภายใน format
11
Multiple Choice
ข้อใดต่อไปนี้ผิด
print(“Program Computer V.5”)
print(‘Program Computer V.5’)
print(“Program Computer %s” %“V.5”)
print(“Program Computer %s” %V.5)
12
Multiple Choice
จากคำสั่งต่อไปนี้ บริเวณที่ขีดเส้นใต้ควรเติมข้อความใดเข้าไปให้สมบูรณ์ถูกต้อง
print("{} + {} = {} "………………………….. )
.format(2+3=5)
.format(2,3,5)
.format(2,3,(2+3))
.format(2:3:5)
13
การรับข้อมูลจากแป้นพิมพ์ด้วยฟังก์ชัน input
14
15
Multiple Choice
ถ้าต้องการรับข้อมูลเก็บไว้ในตัวแปร num ที่ใช้เก็บข้อมูลตัวเลขจำนวนเต็ม ควรใช้คำสั่งในข้อใด
num = input(“ ”)
num = int(input(“ ”)
num = float(input(“ ”)
num = str(input(“ ”)
16
Multiple Choice
ข้อใดคือผลลัพธ์ จากโปรแกรมต่อไปนี้
x, y, z, c=1.2, 2.1, 1.3, 3
z=x+y
k=z/c
print("%f %f %f %d %f" %(x,y,z,k,(z/c)))
1.200000 2.100000 3.300000 1 1.100000
1.200000 2.100000 3.300000 1 1.000000
1.200000 2.100000 3.000000 1 1.100000
1.200000 2.100000 3.000000 1 1.000000
17
Multiple Choice
จากคำสั่งต่อไปนี้ บริเวณที่ขีดเส้นใต้ควรเติมข้อความใดเข้าไปให้สมบูรณ์ถูกต้อง
name = ……………………………………………………
print("Hello!!! %s " %(name) )
int(input(“Enter name :”))
float(input(“Enter name :”))
char(input(“Enter name :”))
input(“Enter name :”)
18
Multiple Choice
จากโปรแกรมต่อไปนี้ ถ้าผลลัพธ์ที่ได้คือ 11.0 144 จะต้องป้อนค่าของ n1 และ n2 เป็นเท่าใด
n1=int(input(" "))
n2=int(input(" "))
print("{} {}".format(((n1+n2)/2),(n1*n1)))
n1 = 10 , n2 = 10
n1 = 11 , n2 = 10
n1 = 12 , n2 = 10
n1 = 13 , n2 = 10
19
Multiple Choice
ถ้า a = 10 , b = 5.5 และ c = “Sunday”
ข้อใดเป็นการใช้คำสั่งไม่ถูกต้อง ไม่สอดคล้องกับชนิดของข้อมูล
a = int(input(“Enter number :”)
print(“%d” %(b))
c = input(“Enter day :”)
print(“to day is {}”.format(c))
ภาษา Python
By นางสาวจิตติรัตน์ เจ๊ะอารง
Show answer
Auto Play
Slide 1 / 19
SLIDE
Similar Resources on Wayground
10 questions
บทเรียนวิชาคอมพิวเตอร์พื้นฐาน
Presentation
•
KG
10 questions
บทเรียนออนไลน์ - วิทยาการคำนวณ2 ม.5 (บทที่ 1-1)
Presentation
•
11th Grade
15 questions
Bab 9 Fungsi
Presentation
•
10th Grade
18 questions
กระบวนการออกแบบเชิงวิศวกรรม
Presentation
•
11th Grade
17 questions
ลักษณะคำประพันธ์ประเภทฉันท์
Presentation
•
11th Grade
11 questions
Dasar-dasar Algoritma
Presentation
•
11th Grade
13 questions
Operating Systems
Presentation
•
10th - 11th Grade
15 questions
แบบทดสอบ react native&expo snack
Presentation
•
12th Grade
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade