← Quiz: Exceptions and Files: all 15 questions
Quiz: Exceptions and Files · Question 2 of 15
What error does int("12a") raise?
What error does int("12a") raise?
- A.TypeError
- B.ValueError
- C.SyntaxError
- D.KeyError
Answer & explanation
Correct answer: ValueError
The type (string) is acceptable, but the value can't be converted: ValueError.
Can you get the rest right without peeking?
Take the timed Quiz: Exceptions and Files quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →