%BE%AD%B5%E4%C8%CB%C1%A6%D7%CA%D4%B4%B9%DC%C0%ED%B5%C4%D7%DA%D6%BC%CA%C7%B0%D1%C8%CB%BA%CD%CA%C2%C6%A5%C5%E4%C6%F0%C0%B4%A1%A3%A3%A8%A3%A9
举一反三
- 写一个文法G,使其语言为不以0开头的偶数集。 A: G[S]:S→AB|BA→AD|CB→2|4|6|8|0C→1|3|5||7|9|B B: G[S]:S→AB|BA→AD|CB→1|2|3|4|5|6|7|8|9C→2|4|6|8|0 C: G[S]:S→AB|BA→AD|CB→2|4|6|8|0C→1|2|3|4|5|6|7|8|9D→0|C D: G[S]:S→AB|BA→AD|DB→2|4|6|8|0D→1|2|3|4|5|6|7|8|9|0
- >>>x= [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9]>>>print(x.sort()) 语句运行结果正确的是( )。 A: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] B: [10, 6, 0, 1, 7, 4, 3, 2, 8, 5, 9] C: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0] D: ['2', '4', '0', '6', '10', '7', '8', '3', '9', '1', '5']
- 【计算题】5 ×8= 6×4= 7×7= 9×5= 2×3= 9 ×2= 8×9= 7×8= 5×5= 4×3= 5+8= 6 ×6= 3×7= 4×8= 9×3= 1 ×2= 9×9= 6×8= 8×0= 4×7=
- set1 = {x for x in range(10)} print(set1) 以上代码的运行结果为? A: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} B: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10} C: {1, 2, 3, 4, 5, 6, 7, 8, 9} D: {1, 2, 3, 4, 5, 6, 7, 8, 9,10}
- 下面语句的输出结果是?range(len('HelloWorld')) A: [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11] B: 11 C: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] D: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]