input: Write a python function to convert a binary number to a decimal number.
  assert bin_to_dec(101) == 5
  assert bin_to_dec(1101) == 13
  assert bin_to_dec(10010) == 18
  assert bin_to_dec(11111) == 31
output: def bin_to_dec(binary_num):
      return int(str(binary_num), 2)