Lawfare Group → Knowledge Institute → Lawfare Academy
Reproduce the worked examples
Copy the complete code below into a UTF-8 file named verify.py and run python verify.py with Python 3. It uses only the standard library and performs exact or rational synthetic calculations. It does not access a network or learner records. Assertions fail if the expected synthetic results change.
These checks verify the stated arithmetic and query behavior, not independent academic acceptance or production migration safety.
from math import ceil,isclose
import json
checks=[]
def check(name,condition):
assert condition,name
checks.append(name)
for name,a,b in [('activation among paid trials',8/10,.8),('month-one use among trial cohort',3/10,.3),('renewal among trial cohort',2/10,.2),('renewal among eligible activators',2/8,.25)]:check(name,a==b)
check('paid trial economic contribution',10*50-10*25-10*2*30==-350)
check('reduced support changed facts',10*50-10*25-10*.5*30==100)
check('renewal contribution base',2*100-2*25-2*1*30==90)
check('renewal contribution high support',2*100-2*25-2*3*30==-30)
check('top-down buyers and revenue',100000*.01==1000 and 1000*200==200000)
check('reachable scenario',1000*.1==100 and 100*200==20000 and 100*(200-120)==8000)
check('fixed-cost buyer threshold',12000/(200-120)==150)
check('partner deduplication',5000-1000==4000)
check('uncapped partner scenario',4000*.1==400 and 400*(200-120-50)==12000)
check('qualified spare delivery',250-100==150)
check('capacity-constrained contribution',150*30==4500 and 8000+4500-12000==500)
check('integer threshold',ceil((12000-8000)/30)==134 and 133*30<4000<=134*30)
check('response threshold',134/4000==.0335)
check('low-conversion change',4000*.02==80 and 80*30==2400 and 8000+2400-12000==-1600)
check('higher fee change',200-120-70==10 and 80*10+8000-12000==-3200)
check('higher fee capacity infeasible',4000/10==400 and 400>150)
check('retained initial runway',90000/15000==6)
check('retained launch total',30000+4*(15000+5000)==110000 and 110000-90000==20000)
check('retained launch deferral no total saving',4*20000+30000==110000)
check('retained pre-hire milestone',6*20000==120000 and 60000/20000==3)
check('immediate hire milestone',6*30000==180000 and 60000/30000==2 and 180000-60000==120000)
check('delayed hire milestone',6*20000+3*10000==150000 and 150000-60000==90000)
check('reserve-inclusive requests',180000+15000-60000==135000 and 150000+15000-60000==105000)
check('eight-month delay',8*20000+5*10000==210000 and 210000+15000-60000==165000)
check('pre-money simple round',150000/(600000+150000)==.2)
check('post-money simple round',150000/600000==.25 and 600000-150000==450000)
check('actual concentration versus equal count',60000/100000==.6 and 1/20==.05)
check('large account contribution',60000-36000==24000 and 40000-24000==16000)
check('current result',24000+16000-30000==10000)
check('lost-account result',16000-30000==-14000 and 10000-(-14000)==24000)
check('feasible avoidable fixed-cost change',16000-(30000-10000)==-4000)
check('trial receipts not annual recurring revenue',50*20==1000 and 50*200==10000)
check('later annual purchase cohort',30*200==6000)
check('rubric',5*6==30)
if __name__=='__main__':print(json.dumps(dict(passed=True,checks=checks,calculated=dict(trialContribution=-350,renewalContribution=90,highSupportRenewalContribution=-30,constrainedChannelNet=500,lowResponseChannelNet=-1600,delayedHireGap=105000,eightMonthGap=165000,largestRevenueShare=.6)),indent=2))
Related chapters
- Tell a venture story whose evidence can be challenged
- Show what each stage of the evidence actually establishes
- Make the market slide reconcile with reach, conversion and capacity
- Make the funding request follow a dated plan and a useful milestone
- Treat objections as tests of evidence and mutual fit
- Revise the business claim before polishing the deck
- Cumulative clinic: an evidence-backed venture pitch and revised ask