You have to use both a while loop and a for loop. Inside of the while loop you should be generating a random value and printing out "X" that random number of times. Just think of what condition you want the while loop to check and you should be good.