Well, as you sound like you are willing to learn to understand the code given to you, and it's only a few lines anyway, I'll get you started.
const byte inPins[8] = {2, 3, 4, 5, 6, 7, 8, 9};
const byte outPins[8] = {10, 11, 12, 13, 14, 15, 16, 17};
void setup() {
for (int i = 0; i < 8; i++) {
pinMode(inPins[i], INPUT_PULLUP);
pinMode(outPins[i], OUTPUT);
}
}
void loop() {
for (int i = 0; i < 8; i++) {
if (digitalRead(inPins[i]) == LOW) {
digitalWrite(outPins[i], HIGH);
delay(500);
digitalWrite(outPins[i], LOW);
}
}
}