题目内容

Select the correct statement.

A. Break ends the loop, ignoring the loop condition
Break ends the loop, ignoring all further statements
Continue goes back to the start of the loop
D. All of the above

查看答案
更多问题

range(3) creates a sequence of which numbers?

A. [1,2,3]
B. [0,1,2,3]
C. [0,1,2]
D. [1,2]

range(2,5) creates a sequence of which numbers?

A. [0,2,4]
B. [2,3,4,5]
C. [2,3,4]
D. [2,4]

range(1,20,8) creates a sequence of which numbers?

A. [0,8,16]
B. [1,9,17]
C. [0,8,16,24]
D. [1,9,17,25]

What does arr[-2] return given the array ‘arr = [2,4,6,8,10]’?

A. 2
B. 4
C. 6
D. 8
E. 10
F. Index out of bounds error

答案查题题库