Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
A missing key: which error does {"a": 1}["b"] give? | StemPy Lab
Quizzes
/
A missing key: which error does {"a": 1}["b"] give?
Python Programming
Easy
High School (9–10)
High School (11–12)
Undergraduate
General
Python Essentials › Errors and Exceptions
Created by
StemPy Lab
A missing key: which error does {"a": 1}["b"] give?
KeyError
IndexError
ValueError
NameError
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← Text and a number do not add. Which error does "5" + 5 give?
try: x = int("12"). except ValueError: x = 0. else: x = x * 2. What is x after it runs? →
More on
Python Essentials › Errors and Exceptions
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
Say which error each line gives, before you run it.
Easy
The data reader of the lesson reports each bad line with a message.
Medium
For each job, say whether you would look before you leap (an if) or try and catch (try and except)…
Easy
Write a function percent(part, total) that gives part / total * 100.
Medium
All problems on this topic →