input: from typing import List
  
  def smallest_average(nums: List[int]) -> float:
      """
      Initially, you have an empty list of floating-point numbers called averages. You are provided with an array nums containing n integers where n is an even number.
  
      You will perform the following steps n / 2 times:
  
      Remove the minimum element, minElement, and the maximum element maxElement, from nums.
      Add (minElement + maxElement) / 2 to the averages list.
      Return the smallest value in the averages list.
  
      Examples:
      >>> nums = [7,8,3,4,15,13,4,1]
      5.5
      >>> nums = [1,9,8,3,10,5]
      5.5
  
      Constraints:
      2 <= n == len(nums) <= 50
      n is even.
      1 <= nums[i] <= 50
      """
output:     
      averages = []
      
      while nums:
          minElement = min(nums)
          maxElement = max(nums)
          
          nums.remove(minElement)
          nums.remove(maxElement)
          
          averages.append((minElement + maxElement) / 2)
      
      return min(averages)
  