网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下列程序的执行结果为?x = 10 print type(x) x = 10.0 print type(x) x = '10.0' print type(x)

A.<type 'int'> <type 'float'> <type 'str'>#B.<type 'int'> <type 'int'> <type 'int'>#C.<type 'str'> <type 'str'> <type 'str'>#D.程序出错

参考答案和解析
2
更多 “下列程序的执行结果为?x = 10 print type(x) x = 10.0 print type(x) x = '10.0' print type(x)A.<type 'int'> <type 'float'> <type 'str'>#B.<type 'int'> <type 'int'> <type 'int'>#C.<type 'str'> <type 'str'> <type 'str'>#D.程序出错” 相关考题
考题 ( 18 )设 x=4 , y=6 ,则下列不能在窗体上显示出 “ A=10 ” 的语句是( )。A ) Print A=x+yB ) Print"A=";x+yC ) Print"A="+Str(x+y)D ) Print"A="x+y

考题 阅读以下说明,回答问题,将解答填入对应的解答栏内。[说明] 计算下列源代码的McCabe环数,画出控制流程图并用罗马数字标出区域。read x,y,z;type =“scalene”;if (x= =y or x = = z or y= = z)type =“isosceles ”;if (x = = y and x = = z) type =“equilateral”;if (x>= y+ z Or y>= x+20rz>=x+ y) type= “not a triangle”;if (x<=0 or y<= 0 or z <=0) type =“bad inputs”;print type;

考题 若有如下程序:public class Test {public static void main (String[] args) {int x=20;if (x>10) System.out.print(x-=5);if (x>5) System.out.print(x--);}}则程序运行后的输出结果是【 】。

考题 下列VB程序运行后,变量x的值为( )x=2Print x+1Print x+2A.2B.3C.5D.8

考题 下列块结构条件语句,正确的是( )。A.If x>10 Then print"a" Else if x>5 Then print"b" Else if x<5 Then print"c" End ifB.if x>10 Then print"a" Else if x>5 Print"b" Else Print"c" End ifC.If x>10 Then print"a" Else if x>5 Then print"b" Else x<5 Then Print"c" End ifD.If x>10 Then Print"a" Else if x>5 Then print"b: Else Print"c" End if

考题 下列程序段的执行结果为( )。 I=4 x=5 Do I=I+1 x=x+2 Loop Until I>=7 Print"I=";I Print"x=";xA.I=4 x=5B.I=7 x=15C.I=6 x=8D.I=7 x=11

考题 下列程序段的执行结果为( )。 Dim x as integer If x Then Print x Else Print x+1 A. 1B. 0C. -1D. 显示出错信息

考题 下列程和序段的执行结果为 x=Int(Rnd()+9) Select Case X Case 10 Print "excellent" Case 9 Print "good" Case 8 Print "pass" Case Else Print "fail" End SelectA.excellentB.goodC.passD.fail

考题 已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End IfB.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End IfC.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End SelectD.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"

考题 下列程序段的执行结果为 I=1 x=5 Do I= I + 1 x= x + 2 Loop Until I>=7 Print " I= ";I Print "x=";xA.I=4 x=5B.I=7 x=15C.I=6 x=8D.I=7 x=17

考题 下列程序段( )能够正确实现条件:如果X<Y则A=15,否则A=-15。A.If X<Y Then A=15 A=-15 Prin AB.If X<Y Then A=15:Print A A=-15:Print AC.If X<Y Then A=1.5:Print A Else A=-15:Print A End IfD.If X<Y Then A=15 Else A=-15 Print A End If

考题 下列程序段的执行结果为 For X=5 To 1 Step -1 For Y=1 To 6-X Print Tab(Y+5);"*"; Next Print NextA.***** **** *** ** *B.***** **** *** ** *C.* ** *** **** *****D. * *** ***** ******* *********

考题 下列程序段的执行结果为 ______。 N=10 For K=N To 1 Step-1 X=Sqr(K) X=X-2 Next K Print X-2A.-3B.-1C.1D.1.16228

考题 下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; nA.10 5B.x nC.9 5D.10 6

考题 下列程序段的执行结果为 i=9 x=5 Do i=i + 1 x=x + 2 Loop Until i>=7 Print "i=":i Print "x=":XA.i=4x=5B.i=7x=15C.i=6x=8D.i=10x=7

考题 如果x为整数且|x|>=100,则打印“OK”,否则打印“Error”,表示这个条件的单行格式 If语句是A.If Int((x)=x And Sqr(x)>=100 Then Print "OK" Else Print "Error"B.If Fix(x)=x And Abs(x)>=100 Then Print"OK"Else Print"Error"C.If Int(x)=x And (x>=100,x<=-100)Then Print"OK"Else Print"Error"D.If Fix(x)=x And x>=100 And x<=-100 Then Print "OK" Else Print "Error"

考题 下面程序段执行结果为x=Iht(Rnd()+4)Select Case x Case 5 Print"excellent" Case 4 Print"good" Case 3 Print"paSS" Case Else Print "fail"End SelectA.excellentB.goodC.passD.fail

考题 下列程序段的执行结果为______。 x=Int (Rnd+4) Select Case x Case 5 Print“优秀” Case 4 Print“良好” Case 3 Print“通过” Case Else Print“没有通过” End SelectA. 优秀B.良好C.通过D.没有通过

考题 有如下程序: Private Type stu X As String Y As Integer End Type Private Sub Command1 Click( ) Dim a As stu X="ABCD" Y=12345 Print a End Sub 程序运行时出现错误,错误的原因是( )。A.Type定义语句没有放在标准模块中B.变量声明语句有错C.赋值语句不对D.输出语句Print不对

考题 下列程序段的执行结果为 I=4 x=5 Do I=I + 1 X=K^2 Loop Until I>=7 Print"I=";I Print"x=";xA.I=4 x=258694B.I=7 x=256987C.I=6 x=365840D.I=7 x=390625

考题 下面程序段执行结果为( )。 x=Int(Rnd()+4) Select Case x Case 5 Print"excellent" Case4 Print"good" Case 3 Print"pass" Case Else Print"fail" End SelectA.excellentB.goodC.passD.fail

考题 下列程序的执行结果是______。 X=-6^2 Print Sgn(x)+Abs(x)+Int(x)A.-36B.1C.-1D.-72

考题 下列程序段的执行结果为 I=9 X=5 Do I=I+1 x=x+2 Loop Until I >=7 Print"I=";I Print"x=";xA.I=4x=5B.I=7x=15C.I=6x=8D.I=10x=7

考题 下列程序段的执行结果为 ______。 N=10 For K=N To 1 Step -1 X=Sqr(K) X=X-2 Next K Print X-2A.-3B.-1C.1D.1.16227765

考题 执行以下语句后显示结果为______。 Dim x As Integer If X Then Print x Else Print X-1A.1B.0C.-1D.不确定

考题 以下程序输出什么?"""x=1"""whilex:print(x) A.运行结果显示NameError:name'x'isnotdefinedB.运行结果无限循环输出1C.它等价于下面的程序#x=1whilex:print(x)D.它等价于下面的程序whilex:print(x)

考题 下列程序段:Dim x If x Then Print x Else Print x+1运行后,显示的结果是()。A、1B、0C、-1D、出错

考题 单选题下列程序段:Dim x If x Then Print x Else Print x+1运行后,显示的结果是()。A 1B 0C -1D 出错