Return the number of 1-bits in the binary representation of a non-negative integer.
Write count_bits(n).
Starter:
def count_bits(n):
# TODO
pass
Solve it interactively in your browser (no setup), check your answer instantly, and keep your daily streak going on IWTLP: https://iwtlp.com/challenge
Top comments (0)