input: Write a function to convert a given number into its binary format. If the number is 0, the function should return 0. Otherwise, it should return the binary representation of the number as a string.
  assert convert_to_binary(10)=='1010'
  assert convert_to_binary(0)==0
  assert convert_to_binary(7)=='111'
  assert convert_to_binary(15)=='1111'
  assert convert_to_binary(255)=='11111111'
output: def convert_to_binary(num):
      if num == 0:
          return 0
      return bin(num)[2:]