NEW
Font size
WorksheetsMODULES,ERROR AND EXCEPTION HANDLING
Total questions: 10
Worksheet time: 20mins
a+b=c,Identify the type of error.
Syntax Error
Logical Error
Semantics
Run time Error
When the grammatical rules of a programming language ,it will result in:
Semantics
Syntax Error
Logical Error
RunTime Error
Trying to access a list element ,dictionary value which does not exist , results……………………………of error.
Runtime error
Logical Error
Syntax Error
Semantics Error
------------------ and -------------------- statements are used to prevent an exception from terminating a program
try,catch
try,except,
try
try,else
Generates a random number from 0 to 1.
randomint()
random()
randomrange()
randoint()
a=20, B=10, C=a+b ;Will result in …………………………… exception.
ValueError
NameError
TypeError
Attribute Error
Can we create a breakpoint using set,trace() ?
Yes
No
Maybe
Any number of except clauses can be included in a try block?
No
Yes
Maybe
What is the other name for logical error. ?
Runtime Error
Semantic Error.
Syntax Error
ValueError
.-----------------function returns the most repeated value of the list/sequence passed.
Mode
Median
Randomint()
random()
