s="BCAABB"
a=[i for i in range(6)]
for i in range(5):
for j in range(5-i):
if s[a[j]] < s[a[j+1]]:
a[j],a[j+1]=a[j+1],a[j]
print(a)
执行该程序段后,输出的结果是( )
A.[2,4,3,0,5,1] |
B.[2,3,0,4,5,1] |
C.[1,0,4,5,2,3] |
D.[1,0,5,4,3,2] |

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

