Kodewick
Start learning →
Starter←→0 / 100

How many claps

#017StarterLoopsNumbers3 min

In the counting game you say 1 up to n and clap on every multiple of 3. Write claps(n) to return how many claps that is.

Examples
claps(10)→3
claps(2)→0
main.py
def claps(n):
    count = 0
    for i in range(1, n + 1):
        # your code here: a multiple of 3 adds 1 to count
        pass
    return count
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.