State-Value Function Bellman Update - Coding problem | OneNoughtOne