Hi snozking,
So first you'll need two variables to store your left and right numbers. You also need one more integer variable to store your random number (call it RandomNumber)
Then, there's a procedure called randint. It works like this:
randint(RandomNumber, 1, 4)
Your variable now has a random number inside of it between 1 and 4.
Finally, you need an if block to check which number you got. It will work something like this:
if RandomNumber = 1 then
put LeftNumber, " + ", RightNumber
elsif RandomNumber = 2 then...
and I'll let you try to figure out the rest.
Hope that helps. Feel free to post your code here if you're still having trouble. |