input: def convert_to_base(x: int, base: int):
      """Convert the given integer x to a different numerical base.
      Returns a string depicting the number in the new base.
      The base should be less than 10.
      >>> convert_to_base(8, 3)
      '22'
      >>> convert_to_base(8, 2)
      '1000'
      >>> convert_to_base(7, 2)
      '111'
      """
output:     if x == 0:
          return '0'
      result = ''
      while x > 0:
          result = str(x % base) + result
          x = x // base
      return result