![](https://gotit-pro.com/wp-content/uploads/2023/10/32cbfdf3-0342-4b54-8391-9088f1abe51c.png)
python: A list is provided in the cell below. The contents of the list are intended to represent the rewards earned by a reinforcement learning agent during an episode. Calculate the return earned by the agent, assuming a discount factor of 0.99. Store the return in a variable named G. Print the value of G rounded to 4 decimal places. When writing your solution, please store the discount factor in a variable named gamma and use this variable in your calculations rather than hard-coding in the va