is line 9 supposed to be lessthan or equalto?
line 15 isn't activated at any time
when line why target itself on line 13? it will only happen once, you need a delay of at least 33 for it to loop
to use random number, you need to set it to 0 when input is done, then do randomnum to it with the max value, then after that is done variable check it, or put the setting to 0 at the end