Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
I don't get the purpose of this task solution in Creative category for The Best Number Ever by imhuwq
def checkio():
table = dict()
import random
for i in range(100):
num = random.randint(1, 10000)
r = num // num
table[r] = table.setdefault(r, 0) + 1
common_pair = max(zip(table.keys(), table.values()))
common_num = common_pair[0]
insight = common_num - common_num
return insight
if __name__ == '__main__':
# These "asserts" using only for self-checking and not necessary for auto-testing
assert isinstance(checkio(), (int, float, complex))
June 1, 2016
Comments: