input: Write a function 'vowels_count' that takes a string representing a word as input and returns the number of vowels in the string. Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a vowel, but only when it is at the end of the given word.
  assert vowels_count("abcde") == 2
  assert vowels_count("Alone") == 3
  assert vowels_count("key") == 2
  assert vowels_count("bye") == 1
  assert vowels_count("keY") == 2
  assert vowels_count("bYe") == 1
  assert vowels_count("ACEDY") == 3
  
output: def vowels_count(word):
      vowels = "aeiouAEIOU"
      count = 0
      for char in word:
          if char in vowels:
              count += 1
      if word[-1].lower() == 'y':
          count += 1
      return count