已知字典x={i:str(i+3)foriinrange(3)},那么表达式’’.join(x.values())的值为()。
第1题:
已知有列表x=[[1,2,3],[4,5,6]],那么表达式[[row[i]forrowinx]foriinrange(len(x[0]))]的值为___________________________。
第2题:
下列程序的输出结果是( )。 #include<iostream.h> void main() {char*str=”12123434”; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=’\0’;i++) switch(str[i]) {case’1’:x4++; case’2’:x3++; case’3’:x2++; case’4’:xl++; ) cout<<xl<<“,”<<x2<<
A.8,6,4,1
B.8,6,3,2
C.8,8,4,l
D.8,6,4,2
第3题:
已知vec=[[1,2],[3,4]],则表达式[[row[i]forrowinvec]foriinrange(len(vec[0]))]的值为_________________________。
第4题:
执行下面的程序,单击窗体后在窗体上显示的结果是 ______。Private Sub form_ Click() Dim Str1 As String, Str2 As String Dim Str3 As String, I As Integer Str1 = "e" for I = t To 2 Str2 = Ucase (Str1) Str1 = Str2 & Str1 Str3 = Str3 & Str1 str1 = Chr (Asc(Str1) + I) Next I Print Str3End Sub
A.EeFF
B.eEfF
C.EEFF
D.eeFF
第5题:
下列程序的输出结果是( )。#include<iostream.h> voidmain() (char*str="12123434"; intx1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=\0;i++) switch(str[i]) {case1:x4++; case2:x3++; case3:x2++; case4:x1++; } cout<<x1<<","<<x2<:<","<<x3< <","<<x4; }
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6.4,2
第6题:
已知字典x={i:str(i+3)foriinrange(3)},那么表达式sum(item[0]foriteminx.items())的值为___________。
第7题:
下列程序的输出结果是( )。#include<iostream.h>
voidmain()
(char*str="12123434";
intx1=0,x2=0,x3=0,x4=0,i;
for(i=0;str[i]!='\0';i++)
switch(str[i])
{case'1':x4++;
case'2':x3++;
case'3':x2++;
case'4':x1++;
}
cout<<x1<<","<<x2<:<","<<x3<
<","<<x4;
}
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6.4,2
第8题:
已知字典x={i:str(i+3)foriinrange(3)},那么表达式sum(x)的值为______。
第9题:
下列程序的输出结果是 #include<iostream.h> void main( ) {char*str="12123434"; int xl=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!='\0';i++) switch(str[i]) {case'1':x4++; case'2':x3++; case'3':x2++; case'4':x1++; } cout<<x1<<","<<x2<<","<<x3<<","<<x4; }
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6,4,2
第10题:
下列程序的输出结果是 #include<iostream.h> void main() { char*str="12123434"; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=‘\0’;i++) switch(str[i]) { case'l':x4++; case'2':X3++; case'3':x2++; case'4':X1++; } cout << X1 << " ," << x2 << " ’" << x3 << " ," << X4; }
A.8,6,4,1
B.8,6,3,2
C.8,8,4,1
D.8,6,4,2