無
*注意事項:
L = [1,-2,3,7,-8,-9,10]
j=len(L)-1
i = 0
k = 0
while i<j:
while L[i]>0:
i=i+1
while L[j]<0:
j=j-1
if i<j:
k = L[i]
L[i]=L[j]
L[j] = k
print(L)
For i = 1 To 3
For j = 1 To 6 - i
If a(j) > a(j + 1) Then t = a(j): a(j) = a(j + 1): a(j + 1) = t
Next j
Next i
數(shù)組元素 a(1)到 a(6)的數(shù)據(jù)依次為“55,31,19,42,37,23”,則此程序運行完成后數(shù)組元素的數(shù)據(jù)依次是 ( )
i = 1: j = 10
x = Int(Rnd * 50) * 2 + 1
Do While i <= j
m = (i + j) \ 2
If x = f(m) Then Exit Do
If x < f(m) Then
j = m - 1
Else
i = m + 1
s = s + Str(m)
Loop
數(shù)組元素f(1)到f(10)的值依次為:3,6,9,11,18,20,25,39,76,98,該程序運行后,s的值不可能的是( )
①用數(shù)碼攝像機拍攝美麗風(fēng)景 ②用掃描儀獲取課本上的文章
③用PhotoShop處理拍攝的照片 ④跟好友在網(wǎng)絡(luò)上進行語音聊天
a=[ ]
for i in range(5):
a.append(i*i)
s=a[3]+a[4]
print (s)
運行結(jié)果:
可以發(fā)現(xiàn)每個漢字的內(nèi)碼是2個字節(jié)。
微信掃碼預(yù)覽、分享更方便
詳情