Search Header Logo
เขียนโปรแกรม python เบื้องต้น

เขียนโปรแกรม python เบื้องต้น

Assessment

Presentation

Computers

10th Grade

Practice Problem

Medium

Created by

ครูกนกวรรณ สุวรรณกูฏ

Used 44+ times

FREE Resource

30 Slides • 27 Questions

1

เขียนโปรแกรม python เบื้องต้น

ทบทวนความรู้ก่อนสอบ

Slide image

2

Slide image

3

Slide image

4

Multiple Choice

int คือชนิดข้อมูลแบบข้อใด

1

ข้อความ

2

จำนวนจินตภาพ

3

ตัวเลขจำนวนเต็ม

4

ตัวเลขทศนิยม

5

Slide image

6

Multiple Choice

float คือชนิดข้อมูลแบบข้อใด

1

ข้อความ

2

จำนวนจินตภาพ

3

ตัวเลขจำนวนเต็ม

4

ตัวเลขทศนิยม

7

Slide image

8

Multiple Choice

str คือชนิดข้อมูลแบบข้อใด

1

ข้อความ

2

จำนวนจินตภาพ

3

ตัวเลขจำนวนเต็ม

4

ตัวเลขทศนิยม

9

Multiple Choice

ข้อใดคือการกำหนดค่า "apple"ให้กับตัวแปร

1

name = print( "apple")

2

input("apple")

3

name = "apple"

4

name = input("apple")

10

Slide image

11

Multiple Choice

คำสั่งที่ใช้แสดงผลในภาษา python คือข้อใด

1

input

2

printf

3

print

4

output

12

Multiple Choice

ข้อใดคือผลลัพธ์ จาก code ที่กำหนดให้ print(Hello world!)

1

Hello world!

2

SyntaxError

3

Hello world

4

print(Hello world!)

13

Multiple Choice

Hello world

This is my name

ข้อใดคือ code ที่ถูกต้อง

1

x = Hello world

y=This is my name

print(x)

print(y)

2

x = "Hello world"

y="This is my name"

print[x]

print[y]

3

a = 'Hello world'

b='This is my name'

print(a)

print(b)

4

a = 'Hello world'

b='This is my name'

print[x]

print[y]

SHOW ANSWER

14

Slide image

15

Slide image

16

Fill in the Blank

print(30+5)

n=30+5

print(n)

ให้นักเรียนพิมพ์คำตอบต่อกันไปไม่ต้องเว้นช่องว่าง

17

Fill in the Blank

num = '34'+'4'

print (num)

ให้นักเรียนพิมพ์คำตอบต่อกันไปไม่ต้องเว้นช่องว่าง

18

Slide image

19

Slide image

20

Multiple Choice

ข้อใดคือผลลัพธ์จาก code ที่กำหนดให้ print("Hello world!" * 2)

1

Hello world world!

2

Hello world!Hello world!

3

Hello world! * 2

4

Hello world!Hello world! * 2

21

Slide image

22

Slide image

23

Slide image

24

Open Ended

 y=a2+b2y=a^2+b^2  แปลงนิพจน์ที่กำหนดให้ ให้เป็นคำสั่ง

25

Open Ended

 x=(52+32)242x=\left(5^2+3^2\right)-\frac{2}{4^2}  แปลงนิพจน์ที่กำหนดให้เป็น คำสั่ง

26

Slide image

27

Multiple Choice

ผลลัพธ์ที่ได้จาก code print(3*5+4) คือข้อใด

1

154

2

19

3

27

4

354

28

Multiple Choice

ผลลัพธ์ที่ได้จาก code print("Hello" + str(2) + "world!") คือข้อใด

1

"Hello" + str(2) + "world!"

2

Hello2world!

3

Helloworld!

4

Hellostr2world!

29

Slide image

30

Slide image

31

Slide image

32

Slide image

33

Multiple Choice

คำสั่งที่ใช้แสดงผลชนิดข้อมูลในภาษา python คือข้อใด

1

input(type())

2

output(type())

3

printf(type())

4

print(type())

34

Multiple Choice

a=500

print(a)

print(type(a))

ข้อใดตอบถูกต้อง

1

500.00

int

2

500

int

3

500.00

float

4

500

float

35

Multiple Choice

d=3.55

print(d)

print(type(d))

ข้อใดตอบถูกต้อง

1

3.55

int

2

35

int

3

3.55

float

4

35.5

float

36

Fill in the Blank

a = "1.265"

print (type(a))

a = int(1.265)

print (type(a))

ให้นักเรียนตอบสั้นๆ เช่น int, float, str

37

Multiple Choice

a = "1280"

print (type(a))

a = float(1280)

print (type(a))

ข้อใดถูกต้อง

1

str

2

int

3

float

4

complex

38

Multiple Choice

a = "600"

print (type(a))

หากต้องการเปลี่ยนให้เป็นเลขทศนิยมต้องเขียนคำสั่งตามข้อใด

1

a = "600"

print (type(a))

a=int(600)

print (type(a))

2

a = "600"

print (type(a))

a=float(600)

print (type(a))

3

a = "600"

print (type(a))

a=str(600)

print (type(a))

4

a = "600"

print (type(a))

a=600

print (type(a))

39

Slide image

40

Slide image

41

Slide image

42

Multiple Choice

Input first number: 2

Input second number: 3

Input third number: 10

x + y + z = 2310

จากผลลัพธ์ที่กำหนดให้ หากจะเขียน code จะเขียนได้ตามข้อใด

1

x = int(input(“intput first number: ”))

y = float(input(“intput second number: ”))

z = input(“intput third number: ”)

print(“x + y + z = “,x+y+z)

2

x = int(input(“intput first number: ”))

y = float(input(“intput second number: ”))

z = float(input(“intput third number: ”))

print(“x + y + z = “,x+y+z)

3

x = input(“intput first number: ”)

y = input(“intput second number: ”)

z = input(“intput third number: ”)

print(“x + y + z = “,x+y+z)

4

x = int(input(“intput first number: ”))

y = int(input(“intput second number: ”))

z = int(input(“intput third number: ”))

print(“x + y + z = “,x+y+z)

43

Multiple Choice

Question image

ข้อใดคือผลลัพธ์จากข้อมูลที่ผู้ใช้กรอกเข้ามา คือ 15 และ 20

1

"num1 + num2"

2

1520

3

35

4

5

44

Multiple Choice

Enter your name: kanokwan

Hello kanokwan

Enter your age: 20

Your age is 20 years old.

จากผลลัพธ์ที่กำหนดให้ หากจะเขียน code จะเขียนได้ตามข้อใด

1

name = input("Enter your name: ")

print("Hello ",name)

age = input("Enter your age: ")

print("Your age is ",age," yerar old")

2

name = input("Enter your name: ")

print("Hello ",name)

age = int(input("Enter your age: "))

print("Your age is ",age," yerar old")

3

name = input("Enter your name: ")

age = input("Enter your age: ")

print("Hello ",name)

print("Your age is ",age," yerar old")

4

name = input("Enter your name: ")

age = int(input("Enter your age: "))

print("Hello ",name)

print("Your age is ",age," yerar old")

45

Multiple Choice

Input first number: 2

Input second number: 3.0

Input third number: 10

x + y + z = 15.0

จากผลลัพธ์ที่กำหนดให้ หากจะเขียน code จะเขียนได้ตามข้อใด

1

x = input("intput first number: ")

y = input("intput second number: ")

z = input("intput third number: ")

print("x + y + z = ",x+y+z)

2

x = int(input("intput first number: "))

y = int(input("intput second number: "))

z = int(input("intput third number: "))

print("x + y + z = ",x+y+z)

3

x = float(input("intput first number: "))

y = float(input("intput second number: "))

z = int(input("intput third number: "))

print("x + y + z = ",x+y+z)

4

x = int(input("intput first number: "))

y = float(input("intput second number: "))

z = int(input("intput third number: "))

print("x + y + z = ",x+y+z)

46

Slide image

47

Slide image

48

Slide image

49

Slide image

50

Slide image

51

Slide image

52

Slide image

53

Slide image

54

Slide image

55

Multiple Choice

code ข้อใดที่สามารถทำงานได้โดยไม่เกิด error

1

IF answer == "Yes":

2

if answer == "Yes"

3

if answer == "Yes":

4

if answer = "yes":

56

Multiple Choice

Question image

ผลลัพธ์จาก code นี้จะเป็นอย่างไรหากผู้ใช้กรอกตัวเลข 0 เข้ามา

1

โปรแกรมไม่ทำงาน

2

Invalid Data

3

No Data

4

i == 0

57

Multiple Choice

Question image

ผลลัพธ์จาก code นี้จะเป็นอย่างไรหากผู้ใช้กรอกตัวเลข 0 เข้ามา

1

Zero

2

Non-Zero

3

เกิด error

4

i ==0

เขียนโปรแกรม python เบื้องต้น

ทบทวนความรู้ก่อนสอบ

Slide image

Show answer

Auto Play

Slide 1 / 57

SLIDE