I create code like following. I want to pass the variable rand and randd in the
iret = iim2.iimPlay(\"rand\")
iret = iim1.iimPlay(
Short answer: remove the quotes like this:
iret = iim2.iimPlay(rand)
iret = iim1.iimPlay(randd)
You are passing strings called "rand" and "randd". Variables aren't encased in quotes. In addition, you are constructing the same object (iret) twice, I'm not sure why. You may have other issues as well, but this is a good start.