def run(): global item, item2, item7, item4, item3, item6, item5 item6 = BlocklyMethods.length( item) item6 = BlocklyMethods.length( item2) item6 = BlocklyMethods.length( item3) item6 = BlocklyMethods.length( item4) item6 = BlocklyMethods.length( item5) item7 = BlocklyMethods.isEmpty( item) item7 = BlocklyMethods.isEmpty( item2) item7 = BlocklyMethods.isEmpty( item3) item7 = BlocklyMethods.isEmpty( item4) item7 = BlocklyMethods.isEmpty( item5) item6 = BlocklyMethods.sumOnList(item) item6 = BlocklyMethods.minOnList(item) item6 = BlocklyMethods.maxOnList(item) item6 = BlocklyMethods.averageOnList(item) item6 = BlocklyMethods.medianOnList(item) item6 = BlocklyMethods.standardDeviatioin(item) item6 = BlocklyMethods.randOnList(item)
def test_medianOnList(self): items = [0, 8, 4, 10] res = BlocklyMethods.medianOnList(items) self.assertEqual(6.0, res)