input: Write a function to count the number of bits set to 1 in a binary representation of an integer.
  assert bits_set(0) == 0
  assert bits_set(1) == 1
  assert bits_set(7) == 3
  assert bits_set(10) == 2
output: def bits_set(n):
      return bin(n).count('1')