Topic: Mathematics Problem / Level: advanced

Problem: Write a program to calculate the expected value of a random variable.

Run the code to see the output here...