Which of the following Python loops iterate from 9 to 0 inclusive? (Select all which apply)多项选择题

A
a. for i in range(10, 0, -1):
B
b. for i in np.arange(0, 10)[::-1]:
C
c. for i in np.arange(10, 0):
D
d. for i in range(9, -1):
E
e. for i in range(9, -1, -1):
F
f. for i in np.arange(10, 0, -1):
G
g. for i in np.arange(9, -1, -1):
H
h. for i in range(9, 0, -1):
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
What is the value of q after the final iteration of the inner most loop when i=30 and k=-3? for i in range(40): j = 4 for k in range(5,-5,-1): s = 5 + j + k for x in range(5,-9,-3): q = -x*s
How many times is the while loop run during the final iteration of the for loop? for i in range(5,1,-1): k = -5 while k < i: k = k + 1 i = i - 1
What is the value of k after the following Python code? k=0 j=1 for i in range(5): while j < i: k += 1
What is the value of p after two iterations of the following loop? p = 1 for k in range(0,100,2): p = k**0.5 p += 3
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!