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
Which of the following commands gives us all even numbers from the array ‘arr = [0,1,2,…,10]?
A. [x for x in arr if x%2==0 in arr]
B. [2*x for x in arr if x<6 in arr]
C. Both are correct
盐度是指()海水中溶解的固体盐类物质的总克数。
A. 10g
B. 100g
C. 500g
D. 1000g