ITS Python 檔案與例外處理課堂測驗

ITS Python 檔案與例外處理課堂測驗

6th - 8th Grade

10 Qs

quiz-placeholder

Similar activities

Teknologi Informasi dan Komunikasi

Teknologi Informasi dan Komunikasi

8th Grade

10 Qs

Uji Pengetahuan Microsoft Word

Uji Pengetahuan Microsoft Word

8th Grade

15 Qs

Ch9檔案與例外處理-綜合演練選擇題

Ch9檔案與例外處理-綜合演練選擇題

6th - 8th Grade

10 Qs

國一資訊科技-期末測驗

國一資訊科技-期末測驗

7th Grade

15 Qs

Folder dan File dalam Komputer

Folder dan File dalam Komputer

7th Grade

10 Qs

三种控制结构测验

三种控制结构测验

7th Grade

5 Qs

khối 7-A-bài 5

khối 7-A-bài 5

6th Grade

10 Qs

Test Pemahaman Materi 7.1.1

Test Pemahaman Materi 7.1.1

7th Grade

10 Qs

ITS Python 檔案與例外處理課堂測驗

ITS Python 檔案與例外處理課堂測驗

Assessment

Quiz

Information Technology (IT)

6th - 8th Grade

Hard

Created by

Vans Tsai

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

請問以下對於檔案的開啟模式,何者敘述正確?

r+ 為寫入模式,指標會置於檔頭

w+ 為可讀寫模式,指定檔案沒有時會新增, 再寫入檔案;若檔案已存在,寫入內容會覆蓋原內容

a+ 為可讀寫模式,指定檔案沒有時會新增, 再寫入檔案;若檔案已存在,則會取消寫入

r- 是唯讀模式,能夠保護檔案不會任意被寫入

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

下列程式建立的檔案,會執行哪種動作?

讀取

寫入

可讀取也可寫入

以上皆非

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

請問哪個檔案函式可以關閉一個檔案?

exit()

stop()

Endfile()

close()

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

在讀取檔案中,如果要更換檔案讀取的位置,

請問要使用哪個函式才能有這個功能?

position()

cursor()

seek()

move()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

你正在製作一個程式,

用來開啟一個單字卡的檔案

單字卡(fruits.txt)的檔案內容如下:

apple

lemon

orange

watermelon

cherry

程式碼如下:
請問 03 行輸出 content 內容為何?

['apple', 'lemon', 'orange', 'watermelon', 'cherry']

['apple\n', 'lemon\n', 'orange\n', 'watermelon\n', 'cherry\n']

apple lemon orange watermelon cherry

apple, lemon, orange, watermelon, cherry

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

請問這段程式碼的最後輸出為何?

True

False

None

程式執行有誤

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

一個純文字檔案(test.txt)的內容為

aaa

bbb

ccc

ddd

eee

現在有一段程式碼能讀取這個檔案,請問 print() 的輸出結果為何?

bbb

Syntax Error

aaa

ddd

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?