MCQs > IT & Programming > Python > Output of the following Python code? value = [2, 3, 4, 5, 6] cd = 0 try: cd = value[3] except IndexError: print('0', end = '') except: print('1', end = '') finally: print('0', end = '') cd = 10 try: cd = cd/0 except ZeroDivisionError: print('1', end = '') finally: print('0')

Python MCQs

What will be the correct output of the following Python code?

value = [2, 3, 4, 5, 6]

cd = 0

try:

cd = value[3]

except IndexError:

print('0', end = '') except: print('1', end = '') finally: print('0', end = '') cd = 10 try: cd = cd/0 except ZeroDivisionError: print('1', end = '') finally: print('0')

Answer

Correct Answer:

010 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it