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])
proftmargin=[round(i*100) for i in proftmargin]
meanofmpat=sum(mpat)/len(mpat)
goodmonths=list([])
for i in range(0,len(mpat)):
goodmonths.append(meanofmpat<mpat[i])
badmonths=list([])
for i in range(0,len(mpat)):
badmonths.append(meanofmpat>mpat[i])
In [2]:
mpat
Out[2]:
In [3]:
max(mpat)
Out[3]:
In [4]:
min(mpat)
Out[4]:
In [6]:
bestmonth=list([])
for i in range(0,len(mpat)):
bestmonth.append(mpat[i]==max(mpat))
In [7]:
bestmonth
Out[7]:
In [8]:
worstmonth=list([])
for i in range(0,len(mpat)):
worstmonth.append(mpat[i]==min(mpat))
In [9]:
worstmonth
Out[9]:
In [10]:
print("monthly revenue")
print(mi)
In [18]:
mi=[round(mi[i]/1000) for i in mi ]
No comments:
Post a Comment