ITS Python 檔案與例外處理課堂測驗
Quiz
•
Information Technology (IT)
•
6th - 8th Grade
•
Hard
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
下列程式建立的檔案,會執行哪種動作?
讀取
寫入
可讀取也可寫入
以上皆非
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
你正在製作一個程式,
用來開啟一個單字卡的檔案
單字卡(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
請問這段程式碼的最後輸出為何?
True
False
None
程式執行有誤
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
一個純文字檔案(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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
11 questions
Ch5串列與元組-進階串列範圍選擇題
Quiz
•
6th - 8th Grade
10 questions
Ch5串列與元組-綜合演練選擇題
Quiz
•
6th - 8th Grade
10 questions
Basic Logic & Programming pt.2
Quiz
•
6th Grade - University
15 questions
İkilik Kod M1
Quiz
•
6th Grade
15 questions
Uji Pengetahuan Teknologi Informasi
Quiz
•
6th Grade
10 questions
Mastering Computer File Management
Quiz
•
8th Grade
10 questions
Файлмен жұмыс туралы тест
Quiz
•
7th Grade
10 questions
Quiz tentang Perangkat Lunak Aplikasi
Quiz
•
8th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Information Technology (IT)
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
12 questions
Digital Citizenship BSMS
Quiz
•
6th - 8th Grade
20 questions
Physical and Chemical Changes
Quiz
•
8th Grade
15 questions
Prefixes: pro- and trans- Assessment
Quiz
•
7th Grade
20 questions
Photosynthesis and Cellular Respiration
Quiz
•
7th Grade
21 questions
Convert Fractions, Decimals, and Percents
Quiz
•
6th Grade
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
