
    Create a function for an educational tool that helps students practice phonetic awareness by taking their written text and reversing only the vowel positions while keeping all other letters in place, excluding 'y' from vowel considerations.
    

    
def reverse_vowels(str1):
    """
    Create a function for an educational tool that helps students practice phonetic awareness by taking their written text and reversing only the vowel positions while keeping all other letters in place, excluding 'y' from vowel considerations.
    

    """
def reverse_vowels(str1):
    """
    Create a function for an educational tool that helps students practice phonetic awareness by taking their written text and reversing only the vowel positions while keeping all other letters in place, excluding 'y' from vowel considerations.
    

    """
    vowels = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            vowels += char
    result_string = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            result_string += vowels[-1]
            vowels = vowels[:-1]
        else:
            result_string += char
    return result_string