This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
def recursive_t9(numbers, letter_map): | |
if len(str(numbers)) == 1: | |
return letter_map[int(numbers)] | |
elif len(str(numbers)) == 0: | |
return [] | |
other_options = recursive_t9(str(numbers)[1:], letter_map) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Stats(arr) { | |
var self = this; | |
var theArray = arr || []; | |
//http://en.wikipedia.org/wiki/Mean#Arithmetic_mean_.28AM.29 | |
self.getArithmeticMean = function() { | |
var sum = 0, length = theArray.length; | |
for(var i=0;i<length;i++) { | |
sum += theArray[i]; | |
} |