Practice ยท 2 of 2
Success Path in else
Refactor: keep the try block containing ONLY the risky conversion, move the success print into else, and keep the error print in except. Output must stay identical for both a valid and an invalid value.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: else/finally & Fail-Fast Drills