网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
#00330038003000301585064512153s=“我命由我不由天” print(s[1:-3]) 该段代码的输出信息是()?
A.命由我
B.命由我不
C.不我由命
D.我由命
参考答案和解析
命由我
更多 “#00330038003000301585064512153s=“我命由我不由天” print(s[1:-3]) 该段代码的输出信息是()?A.命由我B.命由我不C.不我由命D.我由命” 相关考题
考题
在窗体上面一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Coramandl_Click() Dim a s=0 a=Array(1,2,3,4) j=1 For i=4 To 1 Step-1 s=s+a(i)*j j=j*10 Next i Print s End Sub 运行上面的程序,单击命令按钮,其输出结果是______。A.4221B.1234C.34D.12
考题
有如下程序,运行输出的结果是 ______ 。 s=0 Do s=(s+1)*(s+2) n=n+1 Loop Until s>=30 Print n; sA.0 1B.30 30C.4 30D.3 182
考题
有如下程序,运行后输出s的值是______。 For j=1 To 20 x=2*j-1 If x Mod 3=0 0r x Mod 7=0 Then s=s+1 Next j Print sA.5B.9C.11D.15
考题
在窗体上添加一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a s = 0 a = Array(4, 3, 2, 1) j = 1 For i = 4 To 1 Step -1 s = s + a(i)* j j = j * 10 Next i Print s End Sub 运行上面的程序、单击命令按钮,其输出结果是A.4321B.1234C.34D.12
考题
执行以下语句后,输出的结果是 s$=“ABCDEFGHI” Print Mid$(s$,3,4) Print Len(s$)A.ABCD 11B.CDEF 11C.EFGH 11D.HIJK 11
考题
有下面的程序段,其功能是按图1所示的规律输出数据: Dim a(3,5)As Integer For i=1 To 3 For j=1 To 5 a(i,j)=i+j Print a(i,j); Next Print Next若要按图2所示的规律继续输出数据,则接在上述程序段后面的程序段应该是( )。A.For i=1 To 5 For j=1 To 3 Print a(j,i); Next Print NextB.For i=1 T0 3 For j=1 To 5 Print a(j,i); Next Print NextC.For j=l To 5 For i=1 To 3 Print a(j,i); Next Print NextD.For i=1 To 5 For=1 To 3 Print a(i,j): Next Print Next
考题
语句Print Sgn(-6^2)+Abs(-6^2)+Int(-6^2)的输出结果是( )。A.-36B.1C.-1S
语句Print Sgn(-6^2)+Abs(-6^2)+Int(-6^2)的输出结果是( )。A.-36B.1C.-1D.-72
考题
下列程序运行后的输出结果是______。Private Sub f(k,s) s = 1 for j = 1 To k s=s*j Next jEnd SubPrivate Sub Command1_ Click () Sum = 0 for i = 1 To 3 Call f(i, s) Sum = Sum + s Next i Print Sum End SubA.0B.3C.6D.9
考题
在窗体上画一个命令按钮(其名称为Command1),然后编写如下代码:Private Sub Command1 Click( ) Dim a a=Array(1,2,3,4) i=3:j=1 Do While=0 s=s+a i)*j i=i-1 j=j*1c Loop Print S End Sub 运行上面的程序,单击命令按钮,则输出结果是( )。A.4321B.123C.234D.1234
考题
程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End SubA.32B.28C.30D.36
考题
下面四个语句中,输出逻辑为“真”的是()。A.Print Not(3+51 And 32 Or 2
下面四个语句中,输出逻辑为“真”的是( )。A.Print Not(3+5<4+6)B.Print2>1 And 3<2C.Print 1>2 Or 2>3D.Print Not(1>2)
考题
在窗体上画一个命令按钮,其名称为Command1,然后编写如下代码: Option Base 1 Private Sub Command1_Click () Dim a a = Array(1, 2, 3, 4) j = 1 For i = 1 To 4 s = s + a(i) * j j = j * 10 Next i Print s End Sub程序运行后,单击命令按钮,其输出结果是______。A.1234B.12C.34D.4321
考题
在窗体上画一个命令按钮,其名称为Command1,然后编写下列代码: Option Base l Private Sub Command1 Click( ) Dim a a=Array(1,2,3,4) j=1 For i=4 To 1 Step-1 s=s+a(i)*j j=j*10 Next i Print S End Sub 程序运行后,单击命令按钮,其输出结果是( )。A.4321B.1234C.34D.12
考题
在窗体上画一个命令按钮(其NAME属性为Command1),然后编写如下代码:Option Base 1Private Sub Command1_Click()Dim as = 0a = Array(1,2,3,4)j = 1For i = 4 To 1 Step -1 s = s + a(i) * j j = j * 10Next iPrint sEnd Sub运行上面的程序,单击命令按钮,其输出结果是( )。A.4321B.1234C.34D.12
考题
public class Pet{ private String name; public Pet(){ System.out.print(1); } public Pet(String name){ System.out.print(2); } } public class Dog extends Pet{ public Dog(String name){ //这里隐藏了一句代码:super.pet(); System.out.print(3); } } 执行new Dog(“棕熊”);后程序输出是哪项?() A、 23B、 1 3C、 123D、 321
考题
class Waiting implements Runnable { boolean flag = false; public synchronized void run() { if (flag) { flag = false; System.out.print("1 "); try { this.wait(); } catch (Exception e) { } System.out.print("2 "); } else { flag = true; System.out.print("3 "); try { Thread.sleep(2000); } catch (Exception e) { } System.out.print("4 "); notify(); } } public static void main(String [] args) { Waiting w = new Waiting(); new Thread(w).start(); new Thread(w).start (); } } 以下哪两项是正确的?() A、代码输出 1 3 4B、代码输出 3 4 1C、代码输出 1 2 3 4D、代码不会完成
考题
多选题现有: class Waiting implements Runnable { boolean flag=false; public synchronized void run() { if (flag) { flag=false; System.out.print ("1"); try { this.wait(); ) catch (Exception e) { } System.out.print ("2"); } else { flag=true; System.out.print ("3"); try{Thread.sleep (2000); } catch(Exception e) {} System.out.print ("4"); notify(); } } public static void main (String [] args) { Waiting w=new Waiting(); new Thread (w) .start(); new Thread (w) .start(); } } 以下哪两项是正确的?()A代码输出l 3 4B代码输出3 4 1C代码输出l 2 3 4D代码输出1 3 4 2E代码运行完毕F代码不会完成
考题
多选题class Waiting implements Runnable { boolean flag = false; public synchronized void run() { if (flag) { flag = false; System.out.print("1 "); try { this.wait(); } catch (Exception e) { } System.out.print("2 "); } else { flag = true; System.out.print("3 "); try { Thread.sleep(2000); } catch (Exception e) { } System.out.print("4 "); notify(); } } public static void main(String [] args) { Waiting w = new Waiting(); new Thread(w).start(); new Thread(w).start (); } } 以下哪两项是正确的?()A代码输出 1 3 4B代码输出 3 4 1C代码输出 1 2 3 4D代码不会完成
热门标签
最新试卷