This lesson shows how to set a Raspberry Pi pin as input or output. First, you choose the pin numbering system with GPIO.setmode(GPIO.BCM). Then you pick a pin number and set its mode with GPIO.setup. For output pins, you can turn them on or off with GPIO.output. The execution table traces each step: setting mode, configuring pin 18 as output, and turning it on. Variables track the mode and output state changes. Key moments explain why setting the mode first is important and what happens if you don't write output values. The quiz tests your understanding of pin modes and step order. Remember, setting pin mode correctly is the first step to controlling hardware safely and effectively.