Python_Institute
PCAP-31-03 · Question #11
What is the expected behavior of the following code?
The correct answer is B. it outputs list assignment index out of range. See the full explanation below for the reasoning.
Question
What is the expected behavior of the following code?
Exhibit
Options
- Ait outputs error
- Bit outputs list assignment index out of range
- Cthe code is erroneous and it will not execute
- Dit outputs <class ' IndexError' >
How the community answered
(42 responses)- A10% (4)
- B83% (35)
- C2% (1)
- D5% (2)
Community Discussion
No community discussion yet for this question.
