ITS Python 檔案與例外處理課堂測驗
Quiz
•
Information Technology (IT)
•
6th - 8th Grade
•
Practice Problem
•
Hard
Vans Tsai
FREE Resource
Enhance your content in a minute
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
Already have an account?
Similar Resources on Wayground
14 questions
Understanding Computer Basics
Quiz
•
7th Grade
10 questions
Information Technology STO 3 test
Quiz
•
8th Grade
15 questions
Nurillaeva Rana
Quiz
•
6th Grade
10 questions
6 sinif M1
Quiz
•
6th Grade
10 questions
Ch2變數與運算式-綜合演練選擇題
Quiz
•
6th - 8th Grade
10 questions
2.10Format file yang dihasilkan dari file Ms. Word dan Google do
Quiz
•
7th Grade
6 questions
excel test
Quiz
•
6th Grade
10 questions
Artificial Intelligence Quiz
Quiz
•
8th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
Discover more resources for Information Technology (IT)
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
15 questions
scatter plots and trend lines
Quiz
•
8th Grade
23 questions
Academic Vocabulary Pre-assessmsent
Quiz
•
6th Grade
21 questions
Convert Fractions, Decimals, and Percents
Quiz
•
6th Grade
20 questions
Solving Systems of Equations by Graphing
Quiz
•
8th Grade
20 questions
Exponents
Quiz
•
6th Grade
