Skip to Content
Python for Beginners: Write Code That Actually Runs, Then Make It Better
Beginner
0 likes
Courses
Python for Beginners: Write Code That Actually Runs, Then Make It Better

Check Yourself: When Things Go Wrong

Five questions on error messages and try/except. If you get these right, you're ready for the final check.

Course content

Sign in to save your progress.

Course Home
2. The error says NameError: name 'totl' is not defined. What is the most likely fix?
3. You are not sure what can fail in a block, so you wrap it in try: ... except: pass. What is the problem?
4. A user enters 500 when the limit is 1 to 100. int("500") works fine. How should you handle it?
5. Your code stops working after you change three things at once to fix an error. What should you have done?

About

Five questions on error messages and try/except. If you get these right, you're ready for the final check.

Duration
5 min
Last update
09/16/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.