wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

高二資訊課補考題目

Total questions: 10

Worksheet time: 10mins

Name
Class
Date
1.

print()的功能是什麼?

a)

輸入

b)

輸出

c)

宣告

d)

讀取

2.

a='港明中學"

print(a)

請問下列哪個是執行結果?

a)

a

b)

港明中學

c)

print(a)

d)

程式錯誤

3.

a=[2,5,"高中部","台南"]

print(a[2])

請問下列哪個選項為執行結果?

a)

2

b)

5

c)

高中部

d)

台南

e)

沒有結果

4.

在Python中

m=s // 60

ss= s % 60

若s是123,則

print(m,"分",ss,"秒)答案是?

a)

2分30秒

b)


2分3秒

c)


12分3秒

d)

1分23秒

5.

grade=92

if(grade<60):

    print("要加油")

elif(60<=grade<=92):

    print("很棒")

else :

    print("非常好!")

請問下列哪個選項是執行結果?

a)

要加油

b)

很棒

c)

非常好!

d)

程式錯誤

6.

下列清單分別為5位同學與對應成績,執行程式後哪一結果是正確的?

name = ['小明', '小菜','小美','小李','小陳']

score = [90,88,66,73,55]

for i in range(5):

    if(score[i] % 2 ==1):

        print(name[i],score[i],end=",")

a)

小明 90,小陳 55

b)

小明 90 ,小美 66,小陳 55,

c)

小菜 88,小美 66,

d)

小李 73,小陳 55,

7.

下列為一個程式,請問其結果為何?

for i in range(10):

print(i)

a)

0 2 4 6 8 10 12 14 16 18 20

b)

1 3 5 7 9 11 13 15 17 19

c)

0 1 2 3 4 5 6 7 8 9

d)

6 7 8 9 10 11 12 13 14 15

8.

下列為一個程式,請問其結果為何?

sum = 0

for i in range(10):

    sum = sum + i

print("總和為",sum)

a)

40

b)

45

c)

50

d)

55

9.

下列為一個程式,請問其結果為何?

chinese = 72

math = 66

print(chinese+math)

a)

136

b)

138

c)

144

d)

155

10.

下列為一個程式,若輸入的內容為You_Know_my_password請問其結果為何?

text = input("輸入密碼:")

password = 'You_Know_my_password'

if (text == password):

    print("You_Got_it")

else :

    print("You_Password_Is_Error")

a)

You_Password_Is_Error

b)

結果會顯示錯誤

c)

You_Know_my_password

d)

You_Got_it