Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
Write count_divisors(n) for a positive integer n. Return how many integers d from 1 to n (inclusive) satisfy n % d == 0.
Example: count_divisors(6) should return 4 (1, 2, 3, 6).
Skills: return, loop, modulo.