以下程序的输出结果是:a =10b =1try:c=b//(b/a)print(except (IOError ,ZeroDivisionError):print( " calculation error" )else:print(" no error" )}
A: calculation error
B: no error
C: 9.0
D: 9.0no error
A: calculation error
B: no error
C: 9.0
D: 9.0no error
D
举一反三
- 如果A为整数且|A|>=10,则打印“OK”,否则打印“Error”,表示这个条件的单行格式If语句是( )。 A: If Int(A)=A And Sqr(A)>=10 Then Print "OK" Else Print "Error" B: If Fix(=a And Abs(>=10 Then Print "OK" E1se Print "Error" C: If Iht(A)=A And(A>=10,A<=-10)Then Print "OK" Else Print "Error" D: If Fix(A)=A And A>=10,And A<=-10 Then Print "OK" Else Print "Error"
- 下列程序:try: f=open("data.txt",'r')except ValueError: print("Error")else: print("OK")如果当前目录不存在data.txt文件,则输出( ) A: Error B: OK C: 程序运行异常而中断 D: 什么都不输出
- 语句“Print 5\5 * 5”的输出结果是( )。 A: MsgBox vbOKOnly, "Error" B: MsgBox "Error", vbOKOnly C: MsgBox(VbOkOnly,"Error") D: MsgBox ("Error",VbOkOnly)
- 下面程序的输出结果是______s = 'abc' try: for i in range(3): s[i] = 'a' print(s) except: print('Error')[/i]
- 以下程序执行后的结果是:spam=40 spam=spam+2 print(spam) A: 42 B: 40 C: error D: 2
内容
- 0
下列是全局变量的是()。 A: @error B: @@error C: !error D: error()
- 1
The following is not the geometric error of machining process system (). A: machining principle error B: geometric error of machine tool C: adjustment error D: tool manufacturing error
- 2
下列不属于VBA提供的On Error语句形式为()。 A: On Error Goto标号 B: On Error Then 标号 C: On Error Resume Next D: On Error Goto 0
- 3
The following is the machining principle error () . A: approximate profile error of forming tool B: spindle revolving error of machine tool spindle C: guide error of machine tool D: fixture error
- 4
VBA中不能进行错误处理的语句是( )。 A: On Error Got0标号 B: On Error Then标号 C: On Error Resume Next D: On Error Got0 0