Coding challenge

Three 6-sided dice are rolled. Use math.random(1,6) to simulate a dice roll, and write some code that find the probability that the values shown on two of the dice sum to the value on the remaining die. (Ans: 0.21) (Ref: ACM 2014 10A, #17.)

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: