For loop and a random variable

In reply to dave_59:

I’ll post the result once trying.

I appreciate your reply Dave, thanks