<prompt> Write an algorithm that can identify and count the number of vowels in a given word.  <response>: 1. Begin by defining a function that takes a string as its input. Lets call this function count_vowels.2. Initialize a variable vowel_count to zero. This variable will be used to keep track of the number of vowels encountered.3. Create a set of vowels vowels and store the characters a, e, i, o, u. This set will be used to check if a character in the given string is a vowel.4. Using a for loop, iterate over the characters in the input string. i. For each character, check if it is present in the vowels set. ii. If the character is present, increment the vowel_count variable by 1.5. After the completion of the for loop, return the vowel_count variable. This value will be the number of vowels present in the input string.Example implementation in Python:pythondef count_vowelsword: vowel_count 0 vowels a, e, i, o, u for char in word: if char in vowels: vowel_count 1 return vowel_count 