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

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

87、如果输入start数据为2,输入end数据为4,给出下列程序的运行结果____ list1 = ["hello", "world", "python","java", "pascal"] start,end=int(input("输入start:")),int(input("输入end:")) list2=list1[start:end] print(list2)


参考答案和解析
CX;80
更多 “87、如果输入start数据为2,输入end数据为4,给出下列程序的运行结果____ list1 = ["hello", "world", "python","java", "pascal"] start,end=int(input("输入start:")),int(input("输入end:")) list2=list1[start:end] print(list2)” 相关考题
考题 执行下列程序,输入数字3,则输出结果为______。Private Sub Command1_Click()a=inputBox("Input a Number")If a>5 ThenGoTo L5Else If a>2 ThenGoTo L2ElseGoTo L3End IfExit SubL5:Print a Mod 5Exit SubL3:Print a Mod 3Exit SubL2:Print a Mod 2End Sub

考题 下面程序运行结果是( )。 Private Sub Form_Click() Dim x As Single,y As Single x=InputBox("请输入数据25"):y=InputBox("请输入数据10") Print x+y;InputBox("请输入数据25")+InputBox("请输入数据10") End SubA._35_2510B.25102510C._35_35_D.2510_35_

考题 在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() x=Input Box("Input") Select Case x Case 1,3 Print"分支1" Case Is>4 Print"分支2" Case Else Print"Else分支" End Select End Sub 程序运行后,如果在输入对话A.分支1B.分支2C.Else分支D.程序出错

考题 下面( )文件负责处理Application_Start、Application_End、Session_Start和Session_End等事件。A.Web.configB.Config.asaxC.Global.asaxD.Global.inc

考题 请完成下列Java程序:运行3个线程,每一个线程有自己的标志,用a,b,c表示,每个线程显示一个“Start”信息和一个“End”信息并且间隔地显示2个“Loop”信息(间隔变化为(0.5-2)秒之间的随机延迟)。程序运行结果如下:(注:由于时间间隔为随机数,所以,运行结果的顺序不惟一)a Startb Startc Startb Loopa Loopb Loopb Endc Loopa Loopa Endc Loopc End注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。public class ex2_2 implements Runnable {static char flag2_2 = 'a';public static void main(String[] arg) {ex2_2 obj2_2 = new ex2_2();Thread thread2_2 = new Thread(obi2_2);thread2_2.start();thread2_2 = new Thread(obj2_2);thread2 2.start();thread2_2 = new Thread(obi2_2);thread2_2, start ( );}public void run() {char myflag2_2;synchronized(this) {_________________;}System.out.println(myflag2_2 +" Start");for(int i=0; i<2; i++) {try {Thread.sleep(rand(500,2000));System.out.println(myflag2_2 +" Loop");} catch(InterruptedException ie) {System.out.println(ie);}}System.out.println(myflag2_2 +" End");}final private int rand(int low, int high)return(_________________);}}

考题 阅读以下说明和C++代码,将解答写入对应栏内。【说明】请编写一个函数int SeqSearch(int list[],int start,int n,int key),该函数从start开始,在大小为n的数组list中查找key值,返回最先找到的key值的位置,如果没有找到则返回-1。请修改程序中画线部分的错误并将不同情况下的输出结果补充完整。【程序】文件search.cpp的内容如下:include <iostream. h >int SeqSearch( int list[ ] ,int start,int n,int key){for(int i=start;i<=n;i++) //(1){if( list[i] = key)//(2){return i;}}return -1;}void main( ){int A[10]int key,count=0,pos;cout <<" Enter a list of 10 integers:";for(pos=0;pos<10;pos++){cin >>A; //(3)}cout <<" Enter a key; ";cin >> key;pos=0;while(( pos = SeqSearch ( A, pos, 10, key)) !=-1 ){count ++;pos ++;}cout<<key<<"occurs" <<count<< (count!=1?" times":" time") <<" in the list,"<< endl;}第一种情况:输入2 3 12 6 8 45 8 33 7输入key:8输出:(4)第二种情况:输入2 3 126 8 45 8 33 7输入k6y:9输出:(5)

考题 执行下列程序,输入框中显示的默认字符串为上【 】:Private Sub Command l_Click ()Input Box”ok”“输入参数”,Format(”GHl2”’End Sub

考题 在匹配器(Marcher)类中,用于输入字符串与模式串比较的方法是( )。A.static boolean matches()B.boolean matcher.find()C.int matcher.start()D.int matcher.end()

考题 有如下函致: Function fact(x As Integer)As Long Dim p As Long,i As Integer p=1 For i=1 To x p=p*1 Next fact=p End Function 调用它的事件过程如下: Private Sub Command1_Click() i=Val(Inputbox("请输入数据")) a=fact((i)) Print a End Sub 若输入数据5,则运行结果为A.120B.60C.80D.100

考题 本程序的功能是,根据用户输入的文件名,在相应的文件内容中查找匹配给定模式的字符串,并将这些字符串显示出来。模式串为“href="…"”。请填写横线处的内容。注意:请勿改动main()主方法和其他已有语句内容,仅在横线处填入适当语句。import java.io.*;import java.util.regex.*;import javax.swing.*;public class Example2_10{public static void main(String [] argv){final String patternString ="href\\s*=\\s*(\"[^\"]*\"|[^\\s>])\\s*;String fileName ;try{System. out. print ( "请输入html 文件的文件名: ");InputStreamReader in = new InputStreamReader(System.in);BufferedReader imput = new BufferedReader(in);fileName = imput.readLine();if(fileName.equals(" "))return;StringBuffer buffer = new StringBuffer();File file = new File(fileName);FileInputStream readfile = new FileInputStream(file);for(int c = 0; (c = readfile.read()) != -1; )buffer.append((char)c);Pattern pattern = Pattern.compile(_____________ Pattern.CASE_INSENSITIVE);Matcher matcher =________;while (marcher. find ()){int start = matcher.start();int end = matcher.end();String match = buffer.substring(start, end);System.out.println (match);}}catch (Exception excption){System. out.println (excption. getMessage ());}System.exit(O);}}

考题 有如下程序: CLEAR INPUT“请输入数值:”TO A IF A=10 S=10 END IF S=I ?“S=”,S RETURN 如果输入A的值一定是数值型,那么上面条件选择程序的执行结果为( )。A.0B.1C.由A值决定D.程序出错

考题 有以下程序#include stdio.hmain( ){ int arr[ ]={1,3,5,7,2,4,6,8},i,start;scanf("%d", start);for (1=0; 13; i++)printf(”%d”,arr[ (start+i)%8] );}若在程序运行时输入整数10回车,则输出结果为【 12 】。

考题 运行以下程序时,由键盘为变量load输入的数据为20,输出结果为______。 Private Function Wei(load As Integer),Money As Single If load<20 Then Money=load/2 Else Money=20+load End if Wei=Money End Function Private Sub Form. _Click() Dim load As Integer,fee As Single load=InputBox(“请输入一个数:”) fee=Wei(loaD)Print fee End SubA.10B.20C.30D.40

考题 下列程序: Private Sub Command1_Click() a=InputBox("请输入") b=InputBox("请输入") Print=a+b End Sub 运行时输入3和4,输出的结果是A.7B.34C.3+4D.出错

考题 运行下列程序: x=Input Box("input value Of x”) Select Case x Case IsO y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 设有下列程序 Private Sub Form. Click( ) X=50 For i=1 T0 4 y=InputBox("请输入一个整数") y=Val(v) If y Mod 5=0 Then a=a+y x=y Else a=a+x End If Next i Print a End Sub 程序运行后,单击窗体,在输入对话框中依次输入15、24、35、46,输出结果为( )。A.100B.50C.120D.70

考题 如下事件过程: Function Feed(x) If x <10 Then Feed=X Else Feed=10+x End If End Function Private Sub Command1_Click( ) x=Val(Input Box(" ",0)) pay=Feed(x) Print pay End Sub 运行时在输入框内输入变量x的值为15,输出结果为A.0B.15C.25D.30

考题 窗体上有List1、List2两个列表框,List1中有若干列表项(见图),并有下面的程序: Private Sub Command1_Click( ) For k=List1.ListCout-1 To 0 Step-1 If List1.Selected(k)Then List2.Addltem List1.List(k) List1.Removeltem k End If Next k End Sub程序运行时,按照图示在List1中选中2个列表项,然后单击Command1命令按钮,则产生的结果是( )。A.在List2中插入了“外语”、“物理”两项B.在List1中删除了“外语”、“物理”两项C.同时产生A和B的结果D.把List1巾最后1个列表项删除并插入到List2中

考题 执行以下程序段,如果在对话框中输入8,输出结果是"Hello"的是______。A.n = InputBox("请输入一个数") Select Case n Case 7 To 1 Print "Hello" End SelectB.n = InputBox("请输入一个数") Select Case n Case Is>1, Is < 6 Print "Hello" End SelectC.n = InputBox("请输入一个数") Select Case n Case Is > 5, 1, 3 To 10 Print "Hello" End SelectD.n=InputBox("请输入一个数") Select Case n Case 1, 5, Is > 9 Print "Hello" End Select

考题 在匹配器(Matcher)类中,用于输入字符串与模式串比较的方法是A.static boolean matches()B.boolean matcher,find()C.int matcher,start()D.int matcher,end()

考题 在下面程序运行includeint func(char s[]){ int length=0; while(*(s+length))leng 在下面程序运行 #include<iostream.h> int func(char s[]){ int length=0; while(*(s+length))length++; return length; } void main(){ char a[10], *ptr=a; cin>>ptr; cout<<fune(ptr)<<end1; } 如果输入字符串Hello!并回车,则输出结果为 ______。A.4B.7C.6D.5

考题 Premiere Pro CS3的切换提供了哪些对齐方式?()A、Start at CutB、End at CutC、Center at CutD、Custom Start

考题 arr.slice(start[,end]);语法的意思是截取arr数组中,从start位置开始,到end-1位置结束的元素组成新的子数组返回,原数组不变。()

考题 如果想让程序从100H开始存放及执行,用指令()。A、START EQU 100HB、ORG 100HC、END STARTD、MOV START,100H

考题 单选题public class TwoThreads {  private static Object resource = new Object();  private static void delay(long n) {  try { Thread.sleep(n); }  catch (Exception e) { System.out.print(”Error “); }  }  public static void main(String[] args) {  System.out.print(”StartMain “);  new Thread1().start();  delay(1000);  Thread t2 = new Thread2();  t2.start();  delay(1000);  t2.interrupt  delay(1000);  System.out.print(”EndMain “);  }  static class Thread 1 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Startl “);  delay(6000);  System.out.print(”End1 “);  }  }  }  static class Thread2 extends Thread {  public void run() {  synchronized (resource) {  System.out.print(”Start2 “);  delay(2000);  System.out.print(”End2 “);  }  }  }  }  Assume that sleep(n) executes in exactly m milliseconds, and all other code executes in an insignificant amount of time. What is the output if the main() method is run?()A  Compilation fails.B  Deadlock occurs.C  StartMain Start1 Error EndMain End1D  StartMain Start1 EndMain End1 Start2 End2E  StartMain Start1 Error Start2 EndMain End2 End1F StartMain Start1 EndMain End1 Start2 Error End2

考题 多选题Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHAR2(10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column? ( )ASUM(start_date)BAVG(start_date)CCOUNT(start_date)DAVG(start_date,end_date)EMIN(start_date)FMAXIMUM(start_date)

考题 单选题当有用户请求Web页面时,会触发()事件A Application_Start()B Session_Start()C Application_End()D Session_End()

考题 多选题Examine the description of the STUDENTS table: STD_ID NUMBER(4) COURSE_ID VARCHARD2(10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column?()ASUM(start_date)BAVG(start_date)CCOUNT(start_date)DAVG(start_date, end_date)EMIN(start_date)FMAXIMUM(start_date)