# Problem 1

from typing import List

def filtered_even_integers(input_list: List([int]) -> List[int]:
    """ Given a list of integers, return a list that filters out the even integers.
    >>>  filtered_even_integers([1, 2, 3, 4])
    [1, 3]
    >>> filtered_even_integers([5, 4, 3, 2, 1])
    [5, 3, 1]
    >>> filtered_even_integers([10, 18, 20])
    []
    """
    # TODO
    pass

# Test 1

def test_filtered_even_integers(input_list: List()):
    """ Given an input `input_list`, test whether the function `filtered_even_integers` is implemented correctly.
    """
    output_list = filtered_even_integers(input_list)
    # check if the output list only contains odd integers
    for integer in output_list:
        assert integer % 2 == 1
    # check if all the integers in the output list can be found in the input list
    for integer in output_list:
        assert integer in input_list

# run the testing function `test_filtered_even_integers` on a  new testcase
test_filtered_even_integers([31, 24, 18, 99, 1000, 523, 901])

# Problem 2

def repeat_vowel(input_str: str) -> str:
    """ Return a string where the vowels (`a`, `e`, `i`, `o`, `u`, and their capital letters) are repeated twice in place.
    >>> repeat_vowel('abcdefg')
    'aabcdeefg'
    >>> repeat_vowel('Amy Emily Uber')
    'AAmy EEmiily UUbeer'
    """
    # TODO
    pass

# Test 2

def test_repeat_vowel(input_str: str) :
    """ Given an input `input_str`, test whether the function `repeat_vowel` is implemented correctly.
    """
    output_str = repeat_vowel(input_str)
    vowels = ['a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U']
    # check if the number of vowels in the  output string is doubled
    # First get the number of vowels in the input
    number_of_vowels_input = sum([input_str.count(vowel) for vowel in vowels])
    # Then get the number of vowels in the output
    number_of_vowels_output = sum([output_str.count(vowel) for vowel in vowels])
    assert number_of_vowels_input * 2 == number_of_vowels_output

# run the testing function `test_repeat_vowel` on a new testcase
test_repeat_vowe('ABCDEabcdeABCDE YOUUOY')
