input: Write a python function to convert a decimal number to its binary representation.
  assert dec_to_bin(10) == '1010'
  assert dec_to_bin(255) == '11111111'
  assert dec_to_bin(0) == '0'
  assert dec_to_bin(1) == '1'
  assert dec_to_bin(7) == '111'
output: def dec_to_bin(n):
      if n == 0:
          return '0'
      binary = ''
      while n > 0:
          binary = str(n % 2) + binary
          n = n // 2
      return binary