Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Dictionnary solution in Creative category for The Best Number Ever by Amachua
from math import pi, hypot
from random import randint
# Here are somme numbers associated with known person or stuff.
# If you find others association leave a comment :)
def checkio(name="Darren Aronofsky"):
number_dictionnary = {
"Sheldon Cooper": 73,
"Raj Koothrappali": 5318008,
"Hitman": 47,
"William Vance": 13,
"Archimedes": sum(map(ord, "Eureka!")),
"Belzeboss": 666,
"Marquis de Sade": 69,
# Because the sqrt(2) is a cool number.
"Pythagore": hypot(1, 1),
"Penrose": (1+5**.5)/2,
"George Orwell": 1984,
"Darren Aronofsky": pi,
"Null": 0,
"Aztec": 2012,
"Bug year": 2000,
"Freddy Krueger": 13,
#Because of the robotics rules.
"Isaac Asimov": 3,
"Jim Carrey": 23,
"Mikael Håfström": 1408
}
return number_dictionnary[name] if name in number_dictionnary else randint(0,10**10)
April 22, 2015
Comments: