Bird
0
0

What will happen if you run this code snippet?

medium📝 Predict Output Q5 of 15
Raspberry Pi - Camera Module
What will happen if you run this code snippet?
from picamera import PiCamera
camera = PiCamera()
camera.capture()
ANo error, image saved
BImage saved with default name
CError because filename is missing
DCamera preview starts
Step-by-Step Solution
Solution:
  1. Step 1: Check capture() method requirements

    The capture() method requires a filename argument to save the image.
  2. Step 2: Identify error cause

    Calling capture() without filename causes a TypeError for missing argument.
  3. Final Answer:

    Error because filename is missing -> Option C
  4. Quick Check:

    Missing filename causes error [OK]
Quick Trick: Always provide filename to capture() [OK]
Common Mistakes:
MISTAKES
  • Assuming default filename is used
  • Thinking preview starts automatically
  • Ignoring required arguments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes