下列语句中,不能捕获和处理异常的是 A: try:9/0 B: try:9/0except:print("除数不能为0") C: try:9/0except Exception as e:print(e) D: try:9/0except ZeroDivisionError as e:print(e)
下列语句中,不能捕获和处理异常的是 A: try:9/0 B: try:9/0except:print("除数不能为0") C: try:9/0except Exception as e:print(e) D: try:9/0except ZeroDivisionError as e:print(e)
下面代码的输出结果是()。def f(): x=198 print(x) x=9 f() print(x) A: 198 198 B: 198 9 C: 9 198 D: 出错
下面代码的输出结果是()。def f(): x=198 print(x) x=9 f() print(x) A: 198 198 B: 198 9 C: 9 198 D: 出错
下面代码的输出结果是()。def f(): global x x=198 print(x) x=9 f() print(x) A: 198 198 B: 198 9 C: 9 198 D: 出错
下面代码的输出结果是()。def f(): global x x=198 print(x) x=9 f() print(x) A: 198 198 B: 198 9 C: 9 198 D: 出错
The manager would like to have these materials by 9 o'clock. A: printing B: to print C: print D: printed
The manager would like to have these materials by 9 o'clock. A: printing B: to print C: print D: printed
打印输出9*9乘法口决表。 请补充横线处代码: fori in range(1,10): print() for print("%d*%d=%d " %(i,j,i*j),end=" ")
打印输出9*9乘法口决表。 请补充横线处代码: fori in range(1,10): print() for print("%d*%d=%d " %(i,j,i*j),end=" ")
以下程序的执行结果是。 L = [1, 3, 5, 7, 9] print(L.pop(-3), end = ) print(L.remove(L[0]), end = ) print(L) A: 5 1 [3, 7, 9] B: 5 1 [1, 3, 7, 9] C: 5 None [3, 7, 9] D: 5 None [1, 3, 7, 9]
以下程序的执行结果是。 L = [1, 3, 5, 7, 9] print(L.pop(-3), end = ) print(L.remove(L[0]), end = ) print(L) A: 5 1 [3, 7, 9] B: 5 1 [1, 3, 7, 9] C: 5 None [3, 7, 9] D: 5 None [1, 3, 7, 9]
假设 number 的输入是9。以下程序将显示什么?number = eval(input("Enter an integer: ")) isPrime = True for i in range(2, number): if number % i == 0: isPrime = False print("i is", i) if isPrime: print(number, "is prime") break else: print(number, "is not prime") A: i is 3 9 is prime B: i is 3 9 is not prime C: i is 2 9 is prime D: i is 2 9 is not prime
假设 number 的输入是9。以下程序将显示什么?number = eval(input("Enter an integer: ")) isPrime = True for i in range(2, number): if number % i == 0: isPrime = False print("i is", i) if isPrime: print(number, "is prime") break else: print(number, "is not prime") A: i is 3 9 is prime B: i is 3 9 is not prime C: i is 2 9 is prime D: i is 2 9 is not prime
下列程序的执行结果是: a=8 b=9 Print a>b
下列程序的执行结果是: a=8 b=9 Print a>b
已知list_1 = [2, 5, 7, 9, 13, 16],则执行print(list_1.index(9)),得到结果是()
已知list_1 = [2, 5, 7, 9, 13, 16],则执行print(list_1.index(9)),得到结果是()
下列选项中,能找出三位数中,所有个位数字是9并且是3的倍数的数的代码是( )。 A: for i in range(100,1000): if i%10=9 and i%3=0: print(i,end=' ') B: for i in range(100,1000): if i//10==9 and i//3==0: print(i,end=' ') C: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ') D: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ')
下列选项中,能找出三位数中,所有个位数字是9并且是3的倍数的数的代码是( )。 A: for i in range(100,1000): if i%10=9 and i%3=0: print(i,end=' ') B: for i in range(100,1000): if i//10==9 and i//3==0: print(i,end=' ') C: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ') D: for i in range(100,1000): if i%10==9 and i%3==0: print(i,end=' ')