input: def convert_to_binary(num):
      """ Converts a given integer into its binary representation as a string.
      If the number is 0, the function returns '0'. Otherwise, it calculates the binary 
      representation using repeated division by 2 and concatenates the remainders to 
      form the binary string.
  
      Example:
      >>> convert_to_binary(10)
      '1010'
      >>> convert_to_binary(0)
      '0'
      >>> convert_to_binary(255)
      '11111111'
      """
      if num == 0:
          return '0'
      
      binary = ''
      
      while num != 0:
          remainder = num % 2
          binary = str(remainder) + binary
          num = num // 2
      
      return binary
output:     if num == 0:
          return '0'
      
      binary = ''
      
      while num != 0:
          remainder = num % 2
          binary = str(remainder) + binary
          num = num // 2
      
      return binary