input: from typing import List
  
  
  def convert_to_binary(num) -> str:
      """ Converts a number into its binary representation.
      
      Args:
      num (int): The number to be converted into binary format.
      
      Returns:
      str: The binary representation of the number as a string.
      
      Examples:
      >>> convert_to_binary(10)
      '1010'
      >>> convert_to_binary(0)
      '0'
      >>> convert_to_binary(7)
      '111'
      """
output:     if num == 0:
          return '0'
      binary_str = ''
      while num > 0:
          binary_str = str(num % 2) + binary_str
          num = num // 2
      return binary_str