[Question]
  [
## Challenge
Given a single word as input, determine if the word is odd or even.
## Odd and Even words
Assume the general rules:
```
odd + odd = even
even + odd = odd
odd + even = odd
even + even = even
```
In the alphabet, the odd letters are:
```
aeiou
```
And the even letters are:
```
bcdfghjklmnpqrstvwxyz
```
The same applies to capital letters (`AEIOU` are odd and `BCDFGHJKLMNPQRSTVWXYZ` are even).
You then 'add' each of the letters in the word together. For example, the word `cats` is equivalent to:
```
even + odd + even + even
```
Which simplifies to:
```
odd + even
```
Which simplifies further to:
```
odd
```
So the word `cats` is odd.
## Examples
```
Input:  trees
Output: even
```
---
```
Input:  brush
Output: odd
```
---
```
Input:  CAts
Output: odd
```
---
```
Input:  Savoie
Output: even
```
---
```
Input:  rhythm
Output: even
```
## Rules
All input will be a single word which will only contain alphabetical characters.
If the word is odd, output a truthy value. If the word is even, output a falsey value.
## Winning
The shortest code in bytes wins.
  
[Answer]
# EXCEL, 79 bytes:
```
=MOD(SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(LOWER(A1),{"a","e","i","o","u"},""))),2)
```
**input:**  
This function can be placed anywhere **EXCEPT A1**  
Put your word in question into A1.
Output: 0 if even, 1 if odd.
[Answer]
## JavaScript (ES6), ~~34~~ ~~41~~ ~~33~~ 32 bytes
Saved 1 bytes thanks to Arnauld:
```
s=>~s.split(/[aeiou]/i).length&1
```
* Odd word : returns `1`
* Even words : returns `0`
---
Previous solutions:
33 bytes thanks to Arnauld:
```
s=>s.split(/[aeiou]/i).length&1^1
```
* Odd word : returns `1`
* Even words : returns `0`
Another way without bitwise operators:
```
s=>++s.split(/[aeiou]/i).length%2
```
41 bytes:
```
(s,a=s.match(/[aeiou]/ig))=>a&&a.length%2
```
* Odd word : returns `1`
* Even words with odd letters : returns `0`
* Even words with no odd letters : returns `null`
42 bytes to return `0` instead of `null`:
```
(s,a=s.match(/[aeiou]/ig))=>a?a.length%2:0
```
34 bytes, breaks on words with no odd letters:
```
f=s=>s.match(/[aeiou]/ig).length%2
```
Saved 2 bytes thanks to Shaun H
```
s=>s.match(/[aeiou]/ig).length%2
```
[Answer]
# C, 42 bytes
```
f(char*s){return*s&&2130466>>*s&1^f(s+1);}
```
This works with GCC 4.x on a x86-64 CPU. Results may vary with different setups.
Test it on [repl.it](https://repl.it/DePi).
At the cost of 5 more bytes, undefined behavior can be avoided, so the code should work as long as *int*s are at least 32 bits wide.
```
f(char*s){return*s&&2130466>>(*s&31)&1^f(s+1);}
```
### How it works
Modulo **32**, the character codes of all odd letters are **1**, **5**, **9**, **15**, and **21**. **2130466** is the 32-bit integer that has set bits at these positions and unset bits at all others.
When **f** is called on a string, it first checks if the first character of the string is a null byte (string terminator). If it is, `*s` yields **0** and **f** returns **0**. Otherwise, `*s` yield the character code of a letter and the right argument of the logical AND (`&&`) is executed.
For `>>`, GCC generates a shift instruction. On a x86-64 CPU, the corresponding instruction for a 32-bit integer ignores all but the lower 5 bits of the right argument, which avoids reducing `*s` modulo **32**. The right shift and the following bitwise AND with **1** extracts the bit of **2130466** that corresponds to the letter, which will be **1** if and only if the letter is odd.
Afterwards, we increment the pointer **s** (effectively discarding the first letter), call **f** recursively on the beheaded string, and take the bitwise XOR of the result from above and the result of the recursive call.
[Answer]
# sed 44 (42 + 1 for -n) 43
-1 thanks to Neil
```
s/[aeiou][^aeiou]*[aeiou]//gi
/[aeiou]/Ico
```
Prints `o` for odd and nothing for even
[Answer]
## Python, 41 bytes
```
lambda s:sum(map(s.count,"aeiouAEIOU"))%2
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak) ~~206~~ ~~196~~ ~~192~~ 178 + 3 = 181 bytes
[Try it Online!](http://brain-flak.tryitonline.net/#code=KFtdPHsoe31bKCgoKCgoKCkoKSgpKSl7fSl7fSl7fSl7fSl7fSgpXSl7KHt9Wyh7fSgpKV0peyh7fVsoe30pXSl7KHt9Wyh7fSgpKCkpXSl7KHt9Wyh7fSldKXsoe308PikoPD4pfX19fX17fXt9fT48PltbXV08PigpKCkpeygoe31bPD4oKCkpPD4oKSgpXSkpe3t9KHt9KCkpKCg8Pik8Pil9e319e308Pih7fTw-KQ&input=aGVsbG8gZWFydGgh&args=LWE)
```
([]<{({}[((((((()()())){}){}){}){}){}()]){({}[({}())]){({}[({})]){({}[({}()())]){({}[({})]){({}<>)(<>)}}}}}{}{}}><>[[]]<>()()){(({}[<>(())<>()()])){{}({}())((<>)<>)}{}}{}<>({}<>)  
```
This requires the `-c` flag to run in ASCII mode adding an extra 3 bytes to the length of the program.
## Ungolfed
```
([]<
{({}[(((((()()()){}){}){}){}){}()])
 {
  ({}[()()()()])
  {
   ({}[()()()()])
   {
    ({}[(()()()){}])
    {
     ({}[(()()()){}])
     {
      ({}<>)
      (<>)
     }
    }
   }
  }
 }
 {}
}
><>[[]]<>)
(<(()()<>)>)<>{({}[()])<>(({}()[({})])){{}(<({}({}))>)}{}<>}{}<>({}<{}><>)
```
## Explanation
First store the stack height for future purposes
```
([]<...>
```
Then while the stack is not empty (assumes that none of the characters is zero)
```
{...}
```
Subtract ninety seven (and store 3 for later optimizations)
```
({}[((((((()()())){}){}){}){}){}()])
```
If it is not zero (i.e. not a)
```
{...}
```
Subtract 4 (and store 4 for later optimizations)
```
({}[({}())])
```
If it is not zero (i.e. not e)
```
{...}
```
Subtract 4 (and store 4 for later optimizations)
```
({}[({})])
```
If it is not zero (i.e. not i)
```
{...}
```
Subtract 6 (and store 6 for later optimizations)
```
({}[({}()())])
```
If it is not zero (i.e. not o)
```
{...}
```
Subtract 6 (store 6 because the program expects one later)
```
({}[({})])
```
If it is not zero (i.e. not u)
```
{...}
```
Move the remainder to the other stack and put a zero on the active stack to escape all of the ifs
```
({}<>)(<>)
```
Once all of the ifs have been escaped remove the zero and the six
```
{}{}
```
Once all the characters have been processed subtract the height of the offset from the originally stored height.
```
...<>[[]]<>)
```
Mod by two
```
{(({}[<>(())<>()()])){{}({}())((<>)<>)}{}}{}<>({}<>) 
```
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), 6 bytes
```
lžMÃgÉ
```
**Explanation**
```
l       # convert to lower case
 žMÃg   # count odd letters
     É  # true if odd else false
```
[Try it online!](http://05ab1e.tryitonline.net/#code=bMW-TcODZ8OJ&input=U2F2b2lF)
[Answer]
# [Brain-Flak](http://github.com/DJMcMayhem/Brain-Flak), ~~524, 446~~, 422 bytes
```
{(<((((()()()()){}){}){}<>)>)<>{({}[()])<>(({}[({})]())){{}(<({}({}))>)}{}<>}{}<>([(((({}<{}<>>))))]()){(<{}>)<>({}[()])<>}<>({}())<>{}([{}]()()()()()){(<{}>)<>({}[()])<>}<>({}())<>{}(((()()())){}{}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}(((()()()()())){}{}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}((((()()()){}())){}{}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}}(<(()())>)<>{({}[()])<>(({}[({})]())){{}(<({}({}))>)}{}<>}{}<>({}<{}<>>)
```
[Try it online!](http://brain-flak.tryitonline.net/#code=eyg8KCgoKCgpKCkoKSgpKXt9KXt9KXt9PD4pPik8Pnsoe31bKCldKTw-KCh7fVsoe30pXSgpKSl7e30oPCh7fSh7fSkpPil9e308Pn17fTw-KFsoKCgoe308e308Pj4pKSkpXSgpKXsoPHt9Pik8Pih7fVsoKV0pPD59PD4oe30oKSk8Pnt9KFt7fV0oKSgpKCkoKSgpKXsoPHt9Pik8Pih7fVsoKV0pPD59PD4oe30oKSk8Pnt9KCgoKCkoKSgpKSl7fXt9W3t9XSl7KDx7fT4pPD4oe31bKCldKTw-fTw-KHt9KCkpPD57fSgoKCgpKCkoKSgpKCkpKXt9e31be31dKXsoPHt9Pik8Pih7fVsoKV0pPD59PD4oe30oKSk8Pnt9KCgoKCgpKCkoKSl7fSgpKSl7fXt9W3t9XSl7KDx7fT4pPD4oe31bKCldKTw-fTw-KHt9KCkpPD57fX0oPCgoKSgpKT4pPD57KHt9WygpXSk8Pigoe31bKHt9KV0oKSkpe3t9KDwoe30oe30pKT4pfXt9PD59e308Pih7fTx7fTw-Pik&input=SGFsbG8&args=LWE)
Ungolfed, more readable version:
```
{((((()()()()){}){}){})(<({}<>)>)<>{({}[()])<>(({}()[({})])){{}(<({}({}))>)}{}<>}{}<>({}<{}><>)((((({})))))
(())
({}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}
(()()()()())
({}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}
(()()()()()()()()())
({}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}
(()()()()()()()()()()()()()()())
({}[{}]){(<{}>)<>({}[()])<>}<>({}())<>{}
(()()()()()()()()()()()()()()()()()()()()())
({}[{}])
{(<{}>)<>({}[()])<>}<>({}())<>{}}<>(()())(<({}<>)>)<>{({}[()])<>(({}()[({})])){{}(<({}({}))>)}{}<>}{}<>({}<{}><>){{}([()])
(<><>)}({}{}())
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~13 12~~ 11 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-1 byte thanks to @Luis Mendo (use `Ḃ` to replace `%2`)  
-1 byte thanks to @Dennis (use a string compression)
```
Œlf“¡ẎṢɱ»LḂ
```
All test cases are at **[TryItOnline](http://jelly.tryitonline.net/#code=xZJsZuKAnMKh4bqO4bmiybHCu0zhuIIKxbzDh-KCrEvigqxZ&input=&args=InRyZWVzIiwiYnJ1c2giLCJDQXRzIiwiU2F2b2llIiwicmh5dGhtIg)**
How?
```
Œlf“¡ẎṢɱ»LḂ - Main link takes an argument - s
Œl          - lowercase(s)
   “¡ẎṢɱ»   - string of lowercase vowels (compression using the words a and eoui)
  f         - filter - keep only the vowels
         L  - length - the number of vowels
          Ḃ - Bit (modulo 2)
```
---
**Non-competing, 5 bytes** (since I just added the function `Øc`)
```
fØcLḂ
```
Test cases also at **[TryItOnline](http://jelly.tryitonline.net/#code=ZsOYY0zhuIIKxbzDh-KCrEvigqxZ&input=&args=InRyZWVzIiwiYnJ1c2giLCJDQXRzIiwiU2F2b2llIiwicmh5dGhtIg)**
Same as above, but `Øc` yields the Latin alphabet's vowels, `'AEIOUaeiou'`
[Answer]
# Python, 42 bytes
```
lambda s:sum(c in"aeiouAEIOU"for c in s)%2
```
Not a whole lot to explain here. An unnamed function that returns 0 or 1.
[Answer]
# Haskell, ~~38~~ 37 bytes
```
odd.length.filter(`elem`"aeiouAEIOU")
```
Thanks to Angs for one byte!
[Answer]
# Python 3, 53 Bytes
This can probably be golfed further:
```
lambda n:[x in 'aeiou' for x in n.lower()].count(1)&1
```
[Answer]
**C 52 bytes**
```
h(o){o=strpbrk(o,"aeiouAEIOU");return o?1^h(o+1):0;}
```
the main and the result: 
```
main()
{int   k;
 char *a[]={"trees","brush","CAts","Savoie","rhythm", 0};
 for(k=0;a[k];++k)
     printf("[%s]=%s\n", a[k], h(a[k])?"odd":"even");
}
/*
91
[trees]=even
[brush]=odd
[CAts]=odd
[Savoie]=even
[rhythm]=even
*/
```
[Answer]
# Pyth, 14 bytes
```
%l@"aeiou"rQ02
```
[Try it Online!](http://pyth.herokuapp.com/?code=%25l%40%22aeiou%22Q2&input=%22caaeeiiit%22&debug=0)
Explanation:
```
  @"aeiou"       Grab only the vowels
          rQ0      From lowercased input
 l                 Get the length of this
%            2     And mod 2 to check for oddness
```
[Answer]
# Ruby, 30 bytes
```
->w{w.scan(/[aeiou]/i).size%2}
```
[Answer]
# Vim, ~~32, 31~~, 29 keystrokes
```
:s/[^aeiou]//gi
C<C-r>=len(@")%2<cr>
```
Since the V interpreter is backwards compatible, you can [try it online!](http://v.tryitonline.net/#code=OnMvW15hZWlvdV0vL2dpCkMSPWxlbihAIiklMgo&input=SGVsbG9v) right here.
*~~One~~ Three bytes saved thanks to m-chrzan!*
[Answer]
**Java, 73**
```
boolean f(String s){return s.replaceAll("(?i)[^aeiou]","").length()%2>0;}
```
saw a couple other java answers, otherwise wouldn't have shared. Thanks to Phaeze for saving a byte.
[Answer]
# [dimwit](https://github.com/MCMastery/dimwit), 14 bytes (non-competing)
```
ar[aeiou]}et}T
```
I thought this would be a fun, simple challenge to start with for a new language.
### Explanation
* `a` - push a new array to the matrix
* `r[aeiou]}` - count occurrences of all values matching the regex "[aeiou]" in the first array (since the first array contains the input), ignoring case, and push that value to the end of the last array.
* `e` - if the last number in the last array is even (which we set to the number of occurrences), perform the next operations up until a closing bracket ("}")
* `t` - stop execution, clear the matrix, and set the first value to be false
* `}` - end of `e` code block
* `T` - stop execution, clear the matrix, and set the first value to be true
### [Try it online!](http://dgrissom.com/dimwit/index.html?ar[aeiou]%7Det%7DT)
Use the Input field to enter the word.
I'll soon add documentation...
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 36 bytes
```
x=${1,,//[aeiou]/}
((1&${#1}&${#x}))
```
[Try it online!](https://tio.run/##S0oszvj/v8JWpdpQR0dfPzoxNTO/NFa/lktDw1BNpVrZsBZEVtRqav7//98jNScnv9y/KCdFEQA "Bash – Try It Online")
# [Zsh](https://www.zsh.org/), 30 bytes
```
((1&$#1&${#${1:l}//[aeiou]/}))
```
[Try it online!](https://tio.run/##qyrO@P9fQ8NQTUUZiKuVVaoNrXJq9fWjE1Mz80tj9Ws1Nf///@@RmpPjX@5flJMCAA "Zsh – Try It Online")
Accepts input as its first argument. Exits with nonzero if even, exits zero if odd.
We *barely* beat out the bash+coreutils solution!
```
x=${1,,//[aeiou]/}  # lowercase first argument, then remove all [aeiou]
((1&${#1}&${#x}))
  1&     &          # bitwise-and 1 with
    ${#1} ${#x}     # length of first parameter and length of stripped parameter
((             ))   # if nonzero, exit 0 (truthy in shell)
```
The Zsh solution is very similar, but uses the ability to nest parameter expansions to save an assignment.
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 13 bytes
```
=/^"aeiou"?_:
```
[Try it online!](https://ngn.codeberg.page/k/#eJx1j8FKAzEQhu/zFCF40MM2LYLQBBHx5KmHHku1cXe2CW0zbTKpu4g+u21KLYje5uf7Z/im1ffqRVr0lOXDqwZg/XE167+iboUQnVnQylwvWuvXpjO9iTfzz0NnJjkiJmlG82N4izk5aYYlPD1yOs9TuyeP51p0PbtNSaDAMW+TVqqmBpe0bgeJbb3CrnY2LHFQ00btMib2FJIa346Hd8qnynNlQ0VNU71TbACewzazFqL4wCRzibjHcGFF74cddi/oKPs3Oan/c/H0yS8I8A2FOmuS)
Returns `1` for "even" inputs and `0` for "odd" ones.
* `_:` lowercase the (implicit) input
* `^"aeiou"?` generate a bitmask indicating which characters in the (lowercased) input are *not* vowels
* `=/` do an equals-reduce; if there are an even number of `0`s (i.e. vowels), this returns `1`. if there are an odd number, it returns `0`
[Answer]
## [Retina](http://github.com/mbuettner/retina), 19 bytes
```
Mi`[aeiou]
[13579]$
```
[Try it online!](http://retina.tryitonline.net/#code=JShHYApNaWBbYWVpb3VdClsxMzU3OV0k&input=dHJlZXMKYnJ1c2gKQ0F0cwpTYXZvaWU) (The first line enables a linefeed-separated test suite.)
The first line counts the vowels in the input. The second line checks that the result is odd.
[Answer]
# Java 7, 88
```
boolean f(char[]s){int x=0;for(char c:s)if("aeiouAEIOU".indexOf(c)>=0)++x;return x%2>0;}
```
Ungolfed:
```
  boolean f(char[] s) {
    int x = 0;
    for (char c : s) {
      if ("aeiouAEIOU".indexOf(c) >= 0) {
        ++x;
      }
    }
    return x % 2 > 0;
  }
```
[Answer]
## PowerShell v2+, ~~45~~ 42 bytes
```
($args[0]-replace'[^aeiouAEIOU]').Length%2
```
Takes input `$args[0]`, sends it through `-replace` to remove all non-vowel characters, takes the resulting `.length`, and `%2` to check whether it's odd/even.
### Examples
```
PS C:\Tools\Scripts\golfing> 'trees','brush','CAts','Savoie','rhythm'|%{"$_ --> "+(.\is-it-an-odd-word.ps1 $_)}
trees --> 0
brush --> 1
CAts --> 1
Savoie --> 0
rhythm --> 0
```
[Answer]
# J, 20 bytes
```
2|+/@e.&'aeiouAEOIU'
```
Straight-forward approach
## Explanation
```
2|+/@e.&'aeiouAEOIU'  Input: string S
     e.&'aeiouAEOIU'  Test each char in S for membership in 'aeiouAEOIU'
  +/@                 Sum those values
2|                    Take it modulo 2 and return
```
[Answer]
# Japt, 7 bytes
```
1&Uè"%v
```
[**Test it online!**](http://ethproductions.github.io/japt/?v=master&code=MSZV6CIldg==&input=InRyZWVzIg==) Outputs 1 for odd, 0 for even.
### How it works
```
         // Implicit: U = input string
  Uè     // Count the number of matches of the following regex in the input:
    "%v  //   /[AEIOUaeiou]/g
1&       // Take only the first bit (convert 1, 3, 5, etc. to 1, and others to 0)
         // Implicit output
```
[Answer]
# Octave, 34 bytes
```
@(s)mod(nnz(~(s'-'aeiouAEIOU')),2)
s'-'aeiouAEIOU'    % Creates a 2D-matrix where each of the odd letters are 
                   % subtracted from the string s
~(s'-'aeiouAEIOU') % Negates that array, so the all zero elements become 1
nnz( .... )        % Counts all the non-zero elements (the odd letters)
mod(nnz( ....),2   % Takes this sum modulus 2
```
This is 6 bytes shorter than the traditional approach using `ismember`, `@(s)mod(sum(ismember(s,'aeiouAEIOU')),2)`, and two bytes shorter than the regex approach: `@(s)mod(nnz(regexpi(s,'[aeiou]')),2)`.
[Test it here](https://ideone.com/DfHDIN).
[Answer]
# PHP, 41 bytes
```
<?=count(spliti("[aeiou]",$argv[1]))%2-1;
```
This outputs -1 for truthy and 0 for falsey.
[Answer]
## Mathematica, 44 bytes
```
OddQ@StringCount[#,Characters@"aeiouAEIOU"]&
```
Gives True for an odd string and False for an even one.
[Answer]
# q, 29 bytes
```
{mod[sum x in "aeiouAEIOU";2]}
```
[Answer]
# C# ~~64~~ ~~62~~ ~~56~~ 50 Bytes
```
s=>1>s.Split("aeiouAEIOU".ToCharArray()).Length%2;
```
* ~~We are already using linq, so Contains saves 2 bytes over IndexOf~~
* ~~Using the method overload of Count saves 6 bytes~~
* Thanks to @Milk for suggesting a neat method and saving 6 more bytes
An anonymous function that takes a string and counts the odd letters then returns true if there is an odd number of them or false if there is not.
This new solution splits the string on any of the characters in the given char array. The mechanics of this flip the meaning of the `%2` result; 0 is now odd and 1 even hence the `1>`.
[Try it online here!](https://dotnetfiddle.net/xWOl7z)
]