
Python基礎課程 - 第4課 Python 自動化程式(二)
Authored by Cheung 張祺豐老師
Computers
9th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
1. 根據 for index in range(0, 4): 指令,在執行最後一次迭代時,index 的值是多少?
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
2. 根據 for index in range(1, 9, 4): 指令,在執行第二次迭代時,index 的值是多少?
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
3. 下如果變數 n 的初始值為 2.3,以下那個指令能把輸出內容格式化為整數?
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
4. 根據下圖程式,如果變數 n 的輸入值為 3,以下哪項是執行結果?
5.
MATCH QUESTION
1 min • 1 pt
把以下 Python 的 for 循環指令中不同部分的意思配對起來。
for var in range(1, 8, 2):
print(var)
變數的起始值
2
重複執行的指令
1
變數名稱
8
變數的終止值
print(var)
變數的間隔值
var
6.
MATCH QUESTION
1 min • 1 pt
執行以下的 Python 程式,把 for 循環中不同迭代的輸出配對起來。
start = 12
stop = start + 24
step = 4
for n in range(start, stop, step):
print(n)
12
最後一次迭代時
16
第一次迭代時
32
第二次迭代時
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
在 Python 中,for 循環可用於無限次地重複執行指令。
對
錯
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?