Coding challenge

Given randomly chosen numbers, $x$ and $y$, in the interval $[a,b]$, write some code to find the expected value of $xy$? (Ans: $(a+b)^2/4$.)

Type your code here:


Lua reference

See your results here:

Show a friend, family member, or teacher what you've done!

Here is a share link to your code: