• 2022-06-19 问题

    s=’Python is beautiful! ’ 可以输出“PYTHON”的是 A: print(s[0:7]) B: print(s[0:7].upper()) C: print(s[-21:-14].upper) D: print(s[:-14])

    s=’Python is beautiful! ’ 可以输出“PYTHON”的是 A: print(s[0:7]) B: print(s[0:7].upper()) C: print(s[-21:-14].upper) D: print(s[:-14])

  • 2022-06-19 问题

    s=’Python is beautiful! ’, 可以输出“python”的是: A: print(s[0:7]) B: print(s[0:7].lower()) C: print(s[-21:-14].lower) D: print(s[:-14])

    s=’Python is beautiful! ’, 可以输出“python”的是: A: print(s[0:7]) B: print(s[0:7].lower()) C: print(s[-21:-14].lower) D: print(s[:-14])

  • 2021-04-14 问题

    下列程序段中,循环体s = s +1执行了几次? For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 Next Next

    下列程序段中,循环体s = s +1执行了几次? For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 Next Next

  • 2022-05-31 问题

    下列程序段中,循环体s = s +1执行了几次?For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 NextNext A: 5 B: 7 C: 12 D: 49

    下列程序段中,循环体s = s +1执行了几次?For i = 0 To 7 Step 3 For j = 0 To 7 Step 2 s = s + 1 NextNext A: 5 B: 7 C: 12 D: 49

  • 2022-06-07 问题

    设有如下代码段 1 String s = null; 2 if ( s != null & s.length() > 0) 3 System.out.println("s != null & s.length() > 0"); 4 if ( s != null && s.length() > 0) 5 System.out.println("s != null & s.length() > 0"); 6 if ( s != null || s.length() > 0) 7 System.out.

    设有如下代码段 1 String s = null; 2 if ( s != null & s.length() > 0) 3 System.out.println("s != null & s.length() > 0"); 4 if ( s != null && s.length() > 0) 5 System.out.println("s != null & s.length() > 0"); 6 if ( s != null || s.length() > 0) 7 System.out.

  • 2022-06-15 问题

    int s= 0; for(int sum=1; sum<=1000; ____ ){if(sum%7!=0){s = sum +s;}}System.out.println(s); A: sum+1 B: sum-1 C: sum++ D: sum--

    int s= 0; for(int sum=1; sum<=1000; ____ ){if(sum%7!=0){s = sum +s;}}System.out.println(s); A: sum+1 B: sum-1 C: sum++ D: sum--

  • 2022-05-31 问题

    s="Python is cool",可以输出"python"的是 A: print(s[0:7]) B: print(s[:7].lower()) C: print(s[:-8].lower()) D: print(s[-14:-8])

    s="Python is cool",可以输出"python"的是 A: print(s[0:7]) B: print(s[:7].lower()) C: print(s[:-8].lower()) D: print(s[-14:-8])

  • 2021-04-14 问题

    设有如下代码段 1 String s = null; 2 if ( s != null & s.length() > 0) 3 System.out.println("s != null & s.length() > 0"); 4 if ( s != null && s.length() > 0) 5 System.out.println("s != null & s.length() > 0"); 6 if ( s != null || s.length() > 0) 7 System.out.println("s != null & s.length() > 0"); 8 if ( s != null | s.length() > 0) 9 System.out.println("s != null | s.length() > 0"); 哪些行将抛出空指针异常?

    设有如下代码段 1 String s = null; 2 if ( s != null & s.length() > 0) 3 System.out.println("s != null & s.length() > 0"); 4 if ( s != null && s.length() > 0) 5 System.out.println("s != null & s.length() > 0"); 6 if ( s != null || s.length() > 0) 7 System.out.println("s != null & s.length() > 0"); 8 if ( s != null | s.length() > 0) 9 System.out.println("s != null | s.length() > 0"); 哪些行将抛出空指针异常?

  • 2021-04-14 问题

    下列程序段的输出是___ , ___。int k;float s;for (k=0, s=0; k < 7; k ++)s += k/2;printf("%d, %.2f\n", k, s);

    下列程序段的输出是___ , ___。int k;float s;for (k=0, s=0; k < 7; k ++)s += k/2;printf("%d, %.2f\n", k, s);

  • 2022-05-28 问题

    下面代码输出结果是()。inti=0,s=0;do{if(i%2==0){i++;continue;}i++;s=s+i;}while(i<7);System.out.println(s); A: 16 B: 12 C: 18 D: 21

    下面代码输出结果是()。inti=0,s=0;do{if(i%2==0){i++;continue;}i++;s=s+i;}while(i<7);System.out.println(s); A: 16 B: 12 C: 18 D: 21

  • 1 2 3 4 5 6 7 8 9 10