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

题目内容 (请给出正确答案)
下列程序段的执行结果为( )。 Dim x as integer If x Then Print x Else Print x+1

A. 1

B. 0

C. -1

D. 显示出错信息


参考答案

更多 “ 下列程序段的执行结果为( )。 Dim x as integer If x Then Print x Else Print x+1 A. 1B. 0C. -1D. 显示出错信息 ” 相关考题
考题 执行下列Python语句将产生的结果是()。 x=2 y=2.0 if(x==y): print(“Equal”) else: print(“No Equal”)A.EqualB.Not EqualC.编译错误D.运行时错误

考题 下列说法不正确的是()。 知识点:全局变量A.x = 5 def fun(): x = 2 x = x * 3 print(x, end=' ') fun() print(x) 程序无误,输出结果为6 5B.x = 5 def fun(): global x x = 2 x = x*3 print(x, end=' ') fun() print(x) 程序无误,输出结果为6 6C.x = 5 def fun(): x = x * 3 print(x ,end=' ') fun() print(x) 程序无误,输出的结果为15 15D.x = 5 def fun(): print(x, end=' ') fun() print(x) 程序无误,输出的结果为5 5

考题 5、下列程序的运行结果是()。 x=True y=False z=False if not x or y: print(1) elif not x or not y and z: print(2) elif not x or y or not y and x: print(3) else: print(4)A.1B.2C.3D.4

考题 分析程序的输出结果: x = 5 if x > 0 : print(x) else: print(-x)

考题 1、执行下列Python语句将产生的结果是()。 x=2 y=2.0 if(x==y): print(“Equal”) else: print(“No Equal”)A.EqualB.Not EqualC.编译错误D.运行时错误

考题 00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)A.<class 'int'> <class 'float'> <class 'str'>B.<class 'float'> <class 'int'> <class 'str'>C.<class 'str'> <class 'float'> <class 'int'>D.<class 'str'> <class 'int'> <class 'float'>

考题 执行下面程序段后,输出的结果为_______。 def func(c): print(c) x = 200 def func2(): print(x) func2() x = 100 c = [0, 1, 2] func(c[2])A.1 100B.1 200C.2 100D.2 200

考题 下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)A.<class 'int'> <class 'float'> <class 'str'>B.<class 'float'> <class 'int'> <class 'str'>C.<class 'str'> <class 'float'> <class 'int'>D.<class 'str'> <class 'int'> <class 'float'>

考题 下列 Python语句的运行结果为:________ x= False; y= True; z= False if x or y and z: print("yes") else: print("no")

考题 1、执行下面程序段后,输出的结果为_______。 def func(c): print(c) x = 200 def func2(): print(x) func2() x = 100 c = [0, 1, 2] func(c[2])A.1 100B.1 200C.2 100D.2 200