### Instruction: Evaluate the infinite series $\sum_{k = 1}^\infty \frac{k^2}{2^k}.$ Let's write a Python program to solve it.### Response: import sympy as sp

# defining the variable
k = sp.symbols('k')

# defining the sequence for the series
sequence = (k**2)/(2**k)

# calculating the sum of the series
series_sum = sp.summation(sequence, (k, 1, sp.oo))

# print the sum of the series
print(series_sum)