In [1]:
mi= [14574.49, 7606.46, 8611.41, 9175.41, 8058.65, 8105.44, 11496.28, 9766.09, 10305.32,
14379.96, 10713.97, 15433.50]
me = [12051.82, 5695.07, 12319.20, 12089.72, 8658.57, 840.20, 3285.73, 5821.12, 6976.93,
16618.61, 10054.37, 3803.96]
mp=list([])
for i in range(0,len(mi)):
mp.append(mi[i]-me[i])
mpat=list([])
for i in range(0,len(mp)):
mpat.append(mp[i]-mp[i]* 0.3)
mpat=[round(i,2) for i in mpat]
proftmargin=list([])
for i in range(0,len(mpat)):
proftmargin.append(mpat[i]/mi[i])
In [2]:
proftmargin=[round(i*100) for i in proftmargin]
In [3]:
proftmargin
Out[3]:
In [4]:
#good months - where the profit after tax was greater than the mean for the year
In [5]:
sum(mpat)
Out[5]:
In [6]:
mpat
Out[6]:
In [7]:
meanofmpat=sum(mpat)/len(mpat)
In [8]:
meanofmpat
Out[8]:
In [12]:
goodmonths=list([])
for i in range(0,len(mpat)):
goodmonths.append(meanofmpat<mpat[i])
In [13]:
goodmonths
Out[13]:
In [11]:
mpat
Out[11]:
In [14]:
badmonths=list([])
for i in range(0,len(mpat)):
badmonths.append(meanofmpat>mpat[i])
In [15]:
badmonths
Out[15]:
In [16]:
goodmonths
Out[16]:
No comments:
Post a Comment