PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 81


What is the expected behavior of the following code?

Show Answer
Correct Answer: C

C

Discussion

3 comments
Sign in to comment
lukakiOption: C
Nov 25, 2021

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

macxszOption: C
May 3, 2022

C. it outputs 1

seaverickOption: C
Jan 28, 2024

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