all stats

Clouds's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #37

submitted at
0 likes

guesses
comments 0

post a comment


digital_root.py ASCII text
1
2
def digital_root(number, base):
    return number - (base - 1) * ((number - 1) // (base - 1))

round #34

submitted at
0 likes

guesses
comments 0

post a comment


fizzbuzz.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def divis3(number):
    digits = str(number)
    number2 = 0

    for digit in digits:
        number2 += int(digit)

    if len(str(number2)) > 1:
        return divis3(number2)

    if number2 in (3, 6, 9):
        return True

    return False


number = 0
while number < 100:
    number += 1
    string = ""

    if divis3(number):
        string += "Fizz"

    if str(number)[-1] in ("0", "5"):
        string += "Buzz"

    if string == "":
        string = str(number)

    print(string)