Randomization

Hi Dave ,

Thanks for your reply .

If I use class these 2 code snippets in class then this kind of error will not be there , right ?