Algorithm Design By Dynamic Programming Python Code For Snake