Problem:

Find the expectation of $-0.5 x^2+2.7 x+3.5$ where $x \sim $ \text{PoissonDistribution}[2.]

from sympy import *
from sympy.stats import *

x = Poisson('x', 2.)
print(E(-0.5*x**2+2.7*x+3.5))
