0 of 8 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 8 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
You have the potential to do better! 🙂
If you found a concept confusing on this page then please leave a comment below asking for clarity.
Try re-reading the tutorial on this page before you retake this quiz!
Good work on clearing this quiz!
Outstanding work! You have mastered this lesson. Onward to the next one!
How many except statements can a try-except block have?
Check whether the given has any error or not. If yes what type of error is there?
a = 33
b = 0
c = a/b;
print(c)
_______________________ exceptions are raised as a result of an error in opening a particular file.
What is the output of the following code?
a = [1, 2, 3]
try:
print(“Second element = “, a[1]) )
print(“Fourth element = “, a[3]) )
except IndexError:
print(“An error occurred”)
Is the following code valid?
try:
pass
# Do something
except:
pass
# Do something
Can one block of except statements handle multiple exception?
What is the output of the following?
names = {“Geralt” : “Rivia”, “Lara” : “London”, “Ezio” : “Firenze”}
try:
print(names.keys())
print(titles.keys())
except IndexError:
print “An error occurred”
Write true of false- “KeyError error is raised when a dictionary key is not found, unless you were fetching the value using get() and provided a default return value”.