LED blink - need help

Okay thanks for the pointers.

Okay, I used two pins because I thought that you needed an output to provide voltage and an input to see if the switch is pressed? Could you please explain why this is not the case?

The while statements are slightly different. One looks for switch 15 and 41 being pressed and sets the delay value to 100, the other looks for just one and assigns a 2000 delay.