网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
阅读以下程序,填写运行结果_________________. dic={'a':1,'b':9,'c':3,'d':5} lst=sorted(dic.items(),key=lambda x:x[1],reverse=True) print(lst[1][1])
参考答案和解析
D
更多 “阅读以下程序,填写运行结果_________________. dic={'a':1,'b':9,'c':3,'d':5} lst=sorted(dic.items(),key=lambda x:x[1],reverse=True) print(lst[1][1])” 相关考题
考题
下列程序段,运行后窗体上输出结果是 Private Sub Commnad1_Click() a=5∶b=4∶c=3∶d=2 x=3>2*b Or a=c And b<>c Or c>d Print X End SubA. 1 B. True C. False D. 2
考题
已知x=[[1,3,3],[2,3,1]],那么表达式sorted(x,key=lambdaitem:(item[1],-item[2]))的值为____________________________________。
考题
(23)下列程序运行时输出的结果是 Option Base 1 Const a=10 Priate Sub Form_Click() Dim x(a) As Integer k=-1 For i=1 To a x(i)=i*k k=(-1)*k Next i For i=1 To 10 Print x(i) Next i End Sub A.1 3 5 7 9 10 B.-1 -3 -5 -7 -9 C.-1 2-3 4-5 6-7 8-9 10 D.1-2 3-4 5-6 7-8 9-10
考题
下列程序的运行结果为【 】。A="1"B="2"A=Val (@A@+Val (@B@B=Val ("12")If A<>B Then Prink A-B Else Print B-A(11)阅读下列程序:Option Base 1Private Sub Form. Click()Dim x(3,3)For j=1 to 3For k=1 to 3If j=k then x(j,k)=1If j<> k then x(j,k)=3Next kNext jCall fun(x())End SubPrivate Sub fun(a())For j=l to 3For k=1 to 3Print a (j.k);Next kNext jEnd Sub运行程序时,输出的结果是【 】
考题
假定有以下程序: Private Sub Form. Click( ) a=1:b=a Do Until a=5 x=a*b Print b;X a=a+b b=b+a Loop End Sub 程序运行后,单击窗体,输出结果是( )。A.1 1 2 3B.1 1 2 4C.1 1 3 8D.1 1 3 6
考题
单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 `B.9 5 10 6101051010C.9 6 12D.9 10 10 910155410
考题
阅读下面的程序: Private Sub Command1_Click() For i=1 To 3 For j=1 To i For k=j To 3 x=x+1 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,窗体上输出的结果是A.3B.9C.14D.21
考题
阅读下列程序。Option Base 1Private Sub Form CliCk()Dim x(3,3)For j=1 to 3For k=1 to 3If j=k then x(j,k)=1If j<> k then x(j,k)=3Next kNext jCall fun(x())End SubPrivate Sub fun(a())For j=1 to 3For k=1 to 3Print a (j,k);Next kNext jEnd Sub运行程序时,输出的结果是【 】。
考题
阅读下列程序。Option Base 1Private Sub Form. _Click()Dim x(3,3)For j=1 to 3For k=l to 3If j=k then x(j,k)=1If j<>k then x(j,k)=kNext kNext iCall fun(x())End SubPrivate Sub fun(x())For j=1 to 3For k=1 to 3Print x(j,k);Next kNext jEnd Sub运行程序时,输出结果为【 】。
考题
有如下程序: Private Sub Command1_Click() as="A WORKER IS HERE" x = Len(a$) For i=1 To x - 1 b$ =Mid$(a$, i,3) If b$ ="WOR" Then S=S+ 1 Next Print S End Sub 单击命令按钮,程序运行结果为A.1B.2C.3D.5
考题
以下程序运行后的输出结果是______。 Private Sub Form_ Click() y=1 :x=2 Print Iif(x>=y,x,y) End SubA.0B.1C.2D.3
考题
执行下面这段程序后,单击命令按钮,窗体中输出结果是 ______。 Private Sub Command1_Click() a=1 : b=4 : c = 9 : d = 5 If a < b Then If c<d Then x=True Else If a<c Then x=False Else x=True End If End If End If Print Val(x) End SubA.TrueB.FalseC.0D.1
考题
运行以下程序后,显示的结果为 ______。 Dim x(5) x(0) =1 For i=1 To 5 x(i)=x(i-1)*i Print x(i) Next i EndA.1 2 3 4 5B.1 2 6 24 120C.1 2 6 12 20D.1 1 2 3 4
考题
有如下程序: Private Sub Commandl_Click( ) a$="A WORKER IS HERE" x=Len(a$) For i=1,To x-1 b$=Mid$(a$,i,3) If b$="WOR" Then S=S+1 Next Print S End Sub 单击命令按钮,程序运行结果为A.1B.2C.3D.5
考题
单击按钮时,以下列程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=X+y End Sub Private Sub Command1_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call proc1(x,x,2) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 6 6 10B.9 5 10 5 10 10C.9 6 12 9 10 15D.9 5 10 5 4 10
考题
以下程序输出什么?"""x=1"""whilex:print(x)
A.运行结果显示NameError:name'x'isnotdefinedB.运行结果无限循环输出1C.它等价于下面的程序#x=1whilex:print(x)D.它等价于下面的程序whilex:print(x)
考题
执行以下两条语句后,lst的结果是1. lst = [3, 2, 1]2. lst.append(lst)()
A.[3, 2, 1, [3, 2, 1]]B.[3, 2, 1, […]],其中“…”表示无穷递归C.抛出异常D.[3, 2, 1, lst]
考题
填空题已知x=[1,2,3,4,5],那么执行语句x[1::2]=sorted(x[1::2],reverse=True)之后,x的值为()。
热门标签
最新试卷