Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
The Best Number Ever: 9 solution in Creative category for The Best Number Ever by Olpag
def checkio():
from random import randint
print('The Best Number Ever:', 9)
number = randint(1, 10**10)
res = str(9 * number)
print(f'9 * {number} = {res}')
i = 0
while i != 9:
i = sum(map(int, res))
print(f'{res} => {"+".join(list(res))} = {i}')
res = str(i)
return int(res)
if __name__ == '__main__':
# These "asserts" using only for self-checking and not necessary for auto-testing
assert isinstance(checkio(), (int, float, complex))
Aug. 16, 2019