JAKA Robotics interview question

Program python to do algorithm