Domanda di colloquio di Ubiquant Investment

Give a numpy array. How to set 20% elements to zero randomly. How to do Least Square method numerically.