Why wont my for loop generate any random # besides 9?

for (int i=1; i <= 3; i++){
ranNum = random(9,10);
Serial.println(ranNum);
digitalWrite(ranNum, HIGH);
delay(1000);
digitalWrite(ranNum, LOW);
delay(1000);
}

//ranNum are the pins of my LEDS

Syntax

random(max)
random(min, max)

Parameters

min - lower bound of the random value, inclusive (optional)

max - upper bound of the random value, exclusive

Go look at the documentation for the random function. 9 is the only number you can make with that. The second number is the top of the range exclusive of that number, so you're asking it for a random number between 9 and 9.

FIXED!

Just made the max 12 because it usually never gets to 12. So i have a wide variety of 9s, 10s, and 11s now!