Bird
0
0

Given the code snippet:

medium📝 Predict Output Q13 of 15
Raspberry Pi - GPIO Basics with Python
Given the code snippet:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7, GPIO.HIGH)

Which physical pin is set HIGH?
APin 11 on the physical header
BGPIO pin number 7 on the Broadcom chip
CPin 7 on the physical header
DGPIO pin number 11 on the Broadcom chip
Step-by-Step Solution
Solution:
  1. Step 1: Identify the numbering mode used

    The code uses GPIO.setmode(GPIO.BOARD), so pin numbers refer to physical header pins.
  2. Step 2: Check which pin is set HIGH

    GPIO.setup(7, GPIO.OUT) and GPIO.output(7, GPIO.HIGH) set physical pin 7 HIGH.
  3. Final Answer:

    Pin 7 on the physical header -> Option C
  4. Quick Check:

    BOARD mode pin 7 = physical pin 7 [OK]
Quick Trick: BOARD mode means pin number is physical header pin [OK]
Common Mistakes:
  • Confusing BOARD pin 7 with BCM GPIO 7
  • Assuming pin 7 means BCM numbering
  • Mixing physical pin numbers with BCM numbers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes