<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Create a code to input a sentence and output the number of vowels in the sentence.
sentence = "This is a sentence with vowels."<|im_end|>
<|im_start|>assistant
def count_vowels(sentence):
    vowels = ['a', 'e', 'i', 'o', 'u']
    count = 0
    for char in sentence.lower():
        if char in vowels:
            count += 1
    return count

count_vowels(sentence)<|im_end|>
