Exam PCAP All QuestionsBrowse all questions from this exam
Question 81

What is the expected behavior of the following code?

    Correct Answer: C

    C

Discussion
lukakiOption: C

This is ValueError, thus 'except' will be executed. It means answer is C

seaverickOption: C

s='2A' try: n=int(s) except TypeError: n=3 except LookupError: n=2 except: n=1 print(n) Ans is C

macxszOption: C

C. it outputs 1