Find out the Net Promoter Score of this company
import numpy as npurl = "https://raw.githubusercontent.com/hamzamohdzubair/small-data/refs/heads/main/nps.txt"data = np.loadtxt(url)
total = data.shape[0]detractors = data[data<7].shape[0]promoters = data[data>8].shape[0]perc_promoters = (promoters/total)*100perc_detractors = (detractors/total)*100nps = perc_promoters - perc_detractors
Google tag (gtag.js)