Bird
0
0

Identify the error in this code:

medium📝 Debug Q6 of 15
Matplotlib - Image Display
Identify the error in this code:
plt.imshow(img, interpolation='biliner')
AMissing import statement
BTypo in interpolation method name
Cimg variable not defined
Dimshow does not accept interpolation parameter
Step-by-Step Solution
Solution:
  1. Step 1: Check interpolation parameter spelling

    'biliner' is a typo; correct is 'bilinear'.
  2. Step 2: Confirm other possible errors

    Assuming img is defined and import done, only typo causes error here.
  3. Final Answer:

    Typo in interpolation method name -> Option B
  4. Quick Check:

    Typo in method name = error [OK]
Quick Trick: Check spelling of interpolation names carefully [OK]
Common Mistakes:
  • Ignoring typos
  • Assuming missing import
  • Thinking imshow lacks interpolation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Matplotlib Quizzes