[Question]
  [
Given a lower case string. Ex:
```
s = 'abcdefghijklmnopqrstuvwxyz'
```
The goal is to make every other [vowel](https://en.m.wikipedia.org/wiki/Vowel) uppercase.
Desired output here:
```
abcdEfghijklmnOpqrstuvwxyz
```
As you can see, from `aeiou`, \$`e`\$ and \$`o`\$ get uppercased.
For `aeiou`, the desired output is:
```
aEiOu
```
There are only lowercase characters in the strings in all cases.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest code in bytes wins.
*P.S. The [vowels](https://en.m.wikipedia.org/wiki/Vowel) are `aeiou`*
  
[Answer]
# [Perl 5](https://www.perl.org/), 23 bytes
```
s/[aeiou]/$&^$"x$|--/ge
```
[Try it online!](https://tio.run/##K0gtyjH9/79YPzoxNTO/NFZfRS1ORalCpUZXVz899f9/sOi//IKSzPy84v@6BQA "Perl 5 – Try It Online")
## Explanation
`s///`ubstitutes each of the lowercase vowels with itself XORed with either 1 or 0 spaces (`$"` defaults to space) based on `$|--` which will alternate each time it's decremented.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 61 bytes
A full program, where input is taken from STDIN.
```
x;main(c){for(;read(0,&c,1);)putchar('Xz'%c?c:c^x++%2*32);}
```
[Try it online!](https://tio.run/##BcFJDkAwAAXQJRdBa0gMO124hpWkvnlWUxFnr/fg1YBSko28nQjoW82CMFHygviuCTegjC7HjoYLYqWPrlkGEsTIpOMYoR2FlH1K8RxFWdVN2/XDOM3LKrb9OC95Pz8 "C (gcc) – Try It Online")
### Checking for vowels
Vowels are `aeiou`, which have the corresponding ASCII codes `97,101,105,111,117`. The LCM of these numbers is `1484392455`, which has the property of being evenly divisible by only the letters `aeiou`. Therefore, we can say that `c` is a vowel if `1484392455%c` equals `0`. We can compress this number by the use of multi-character constants, giving `'Xz\x08\x07'`.
# [C (clang)](http://clang.llvm.org/), 48 bytes
As offered by [@AZTECCO](https://codegolf.stackexchange.com/users/84844/aztecco), a function which takes a wide string as input, and modifies the string in-place.
```
x;f(*s){for(x=0;*s;)*s++^='Xz'%*s?0:x++%2*32;}
```
[Try it online!](https://tio.run/##S9ZNzknMS///v8I6TUOrWLM6Lb9Io8LWwFqr2FpTq1hbO85WPaKKg11dVavY3sCqQltb1UjL2Mi69n9mXolCcXSsgq2Cj1JiUnJKalp6RmZWdk5uXn5BYVFxSWlZeUVllZI1FxdIZW5iZp6GpkI1l0KaRrGmNZdCQRFQOE1DSTWnWElHASRU@x@3MQA "C (clang) – Try It Online")
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 17 bytes
```
1,2,T`l`L`[aeiou]
```
[Try it online!](https://tio.run/##K0otycxLNPyvquGe8N9Qx0gnJCEnwSchOjE1M7809v//xKTklNS09IzMrOyc3Lz8gsKi4pLSsvKKyiousBKu3MTsVIXUstSiSoX8kozUIoWy/PLUHIXSgoLUouTE4lQA "Retina – Try It Online") Link includes test cases. Explanation:
```
[aeiou]
```
Match lower case vowels.
```
1,2,
```
Only process every other vowel.
```
T`l`L`
```
Upper case them.
Although the transliterate command has a shortcut code for vowels, they aren't of any help here so I haven't used them.
[Answer]
# [R](https://www.r-project.org/), 57 bytes
```
function(s,t=s%in%utf8ToInt("aeiou"))s-t*32*!cumsum(t)%%2
```
[Try it online!](https://tio.run/##fYw7EsIwDAV7TgGZ8YydIU1oKOAA6cMBHGODIJHAlvhd3piOBl67uy/mMN80OQg6BkKdlrxNClAJh3VPHbKurAeSypjUcL1q64WTKcmk2SjVZkDuaVdkHfR3M7i9D4cjnM7jhHS5xsRyuz@er3JkZj@qwY4WHUH0/yxb9uH5DQ "R – Try It Online")
Input is vector of character codes (for comparison to [pajonk's answer](https://codegolf.stackexchange.com/a/240507/95126)). Would be [77 bytes](https://tio.run/##NYqxDsIgFAB3v0JJSKBpl7o4SJjd616KoE/bh5aHVn8ecfCmy@Xm7Nf7JvuEliCgWOpe9yqR33XhgFRHpZeaVOSAXDPjICQmAakLx/KI2FC1bauNTVNMkyDJeSuzF4KZwZ6cP1/gehsnDPfHHCk9X8v7w6Rc/Y7BjAZtgNn9iykUz18) with input as string (for comparison to [Maël's answer](https://codegolf.stackexchange.com/a/240492/95126)).
---
*Edit*: this approach would be only [48 bytes](https://tio.run/##K/qfpmCj@z@tNC@5JDM/T6NYp8RW0dDEwsTY0sjE1FRVtVizWLdEy9hISzG5NLe4NFejRFNV1eh/Zl5JSH5oSZqFRppGKZAKyffMK9FQSkxKTklNS8/IzMrOyc3LLygsKi4pLSuvqKxS0tTU5MKhKykxJzEvOT@zKBWfqkQgAMn/BwA) by porting [dingledooper's great modulo trick](https://codegolf.stackexchange.com/a/240487/95126)...
[Answer]
# [Python](https://www.python.org), ~~73~~ ~~71~~ ··· 58 bytes
```
lambda s,c=0:bytes(a^c|(c:=c^34087456>>a-97&32)for a in s)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3rXISc5NSEhWKdZJtDaySKktSizUS45JrNJKtbJPjjE0MLMxNTM3s7BJ1Lc3VjI000_KLFBIVMvMUijWhJqgXFGXmlWikaSQpJSYlp6SmpWdkZmXn5OblFxQWFZeUlpVXVFYpaUKVL1gAoQE)
Inputs and outputs as a byte string.
Explanation (I use a `$` sigil on variables to distinguish them from letters):
* Consider the lookup table for "letter `$a` is a vowel": this is the binary array `10001000100000100000100000` (the `1`s are at the alphabet positions of `aeiou`)
* If we store this as an integer (converting the binary array into a decimal number `35784736`), we can lookup into it using `35784736 >> 97 - alphabet_index($a) & 1`
* If `$a` is actually the ASCII code of the character, we can get its alphabet index using `$a - 97` (since `'a' == 97`)
* By taking input and output as `bytes` in Python, we can get this ASCII code basically for free
* We can reverse the lookup table to make it shorter by changing `$a - 97` to `97 - $a`, because by reversing it the trailing zeroes (for `vwxyz`) become leading zeroes and make the number smaller
* The reverse lookup table is `00000100000100000100010001 = 100000100000100010001`, or `1065233` in decimal, giving us `1065233 >> $a - 97 & 1`
* We can toggle the flag variable `$c` if `$a` is a vowel, using `$c := $c ^ (1065233 >> $a - 97 & 1)`
* We also want to uppercase `$a` sometimes. Observe that the uppercase ASCII letters differ from the lowercase letters by exactly `32`, so we can toggle the case of `$a` using `$a ^ 32`
* The case toggling should happen if both:
	+ `$c` is *on* (since we initialise it to `0`, and every vowel starting with the *second* should be capitalised)
	+ `$a` is a vowel
* This is equivalent to `$a ^ 32 * ($c & (1065233 >> $a - 97 & 1))`
* If we store "on" as `32` rather than just `1`, and we adjust the lookup table to return `32`/`0` rather than `1`/`0`, we'll save bytes.
* We can do this by using `1065233 * 32 = 34087456` as the magic number and `&`-ing with `32` instead of `1`. The resulting expression is `34087456 >> ($a - 97) & 32`
* We want to avoid using `34087456 >> ($a - 97) & 32` in more than one place, because it's a long expression
* Since we're modifying `$c` with a `:=` expression, we can do a computation on its value before and after modification to extract the correct value. Let `$c` be the value before modification and `$c'` be the new value
* `$c'` is different to `$c` if and only if `$a` is a vowel, so we want to capitalise if `$c` is *on* and `$c' != $c`, i.e. **`$c` is on and `$c'` is off**
* Recall that lowercase letters have the `32`s bit set, and to uppercase a letter we need to unset it. This means `$a` has the `32`s bit set initially
* By `xor`ing `$a` and `$c`, when `$c` is on, we remove the `32`s bit, uppercasing the letter
* But we only want to do this when `$a` is a vowel, so we can re-set the `32`s bit when it isn't. Thus by adding `| $c'`, the `32`s bit is added again when `$c'` is `32`. This is the case if `$c` was `32` and `$a'` was not a vowel, so the bit is only removed when `$a` is a vowel *and* `$c` is `32`
[Answer]
# [Jelly](https://github.com/DennisMitchell/jellylanguage), 13 bytes
```
e€ØẹTḊm2
Œuç¦
```
[Try It Online!](https://jht.hyper-neutrino.xyz/tio#WyIiLCJl4oKsw5jhurlU4biKbTJcbsWSdcOnwqYiLCIiLCIiLFsidGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZ3MiXV0=)
```
e€ØẹTḊm2  Helper Link; get every other vowel
e€        For each element, is it in
  Øẹ      the list of vowels ("aeiou")?
    T     Get said indices
     Ḋm2  Pop off the first one and take every other one
Œuç¦      Main Link
   ¦      Apply
Œu        to-uppercase
  ç       to every other vowel
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 9 bytes
```
ATy$_⁽⇧¨M
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIiLCJBVHkkX+KBveKHp8KoTSIsIiIsImFlaW91Il0=)
The power of triads!
## Explained
```
ATy$_⁽⇧¨M
AT       # indices of vowels
  y      # uninterleave into two lists - this pushes a list of every second vowel and every first vowel
   $_    # remove the list of every first vowel
     ⁽⇧¨M # and apply upper-case (a function pushed by ⁽⇧) to those indices (¨M)
```
[Answer]
# [R](https://www.r-project.org/), 94 bytes
*-26 bytes thanks to Giuseppe. -2 bytes thanks to Robin Ryder*
```
function(s){s=el(strsplit(s,""))
s[i]=toupper(s[i<-grep("[aeiou]",s)[!1:0]])
Reduce(paste0,s)}
```
See [pajonk](https://codegolf.stackexchange.com/a/240507/108550)'s and [Dominic van Essen](https://codegolf.stackexchange.com/a/240509/108550)'s answers for a clever use of `intToUtf8` and `utf8ToInt`.
[Try it online!](https://tio.run/##HcpNDsIgEEDhfU@hs2KSNqlbYy/htmFB6VBRBGTA33h2bFy@fC9Vszl01RSvsw1eMH54ICc4J47OZsEtAGLDo5VDDiVGSmKNQ7ckigJGRTYUCS3juN3teymxOdJcNImoOFO/wrcawQOoSc9klpM9X9zVh3hLnMv98Xy9AZv/MSmnvA42EWD9AQ "R – Try It Online")
[Answer]
# x86 / x86-64 machine code, 22 bytes
Takes pointer (RSI), length (RCX) in registers, modifies the string in-place. Callable from C with the x86-64 SysV calling convention as `void vowel_alt_caseflip(int dummy, char *RSI, int dummy, size_t RCX)`. Same machine code works in 32-bit mode, although none of the standard 32-bit C calling conventions match.
NASM listing, with address, machine-code bytes, and source the machine-code answer was generated from.
```
     1                         ;;; char *str /* RSI */,  size_t len /* RCX */
     2                         vowel_alt_caseflip:
     3 00000000 BF22822000         mov edi, 0x0208222      ; ASCII vowel bitmap, 1-indexed like ASCII codes are with 'a' = 0x61 not 0x60
     4 00000005 31D2               xor edx, edx            ; first vowel is not flipped
     5                         .loop:
     6 00000007 AC                 lodsb                   ; al = *str++
     7 00000008 0FA3C7             bt  edi, eax            ; if (bitmap & (1<<(al&31)))
     8 0000000B 7306               jnc .non_vowel
     9 0000000D 3056FF             xor [rsi-1], dl         ; caseflip or not the current character
    10 00000010 80F220             xor dl, 0x20            ; toggle state for the next
    11                         .non_vowel:
    12 00000013 E2F2               loop  .loop
    13 00000015 C3                 ret
; next address is 0x16, size is 0x16 = 22 bytes
```
Since the input string is guaranteed to be all lowercase alphabetic, I just used XOR instead of AND with `~0` / `~0x20` to flip instead of clear the ASCII lower-case bit. It would work out to the same size with `mov dl, 0xFF` / `and [rsi-1], dl`.
[Try it online!](https://tio.run/##zVM9b9swEN35K24oYruxDUkBiiJOh6JTlg7tmAYKJZ5lxhSpkGdb7p93T5S/8oV2LAdRpN69e/fuJEPAujDbiZWh3u3WboMml4byUgacG91cC@BVuzWg0mNI2iRLPmdZBnHN4OvPb7e3EOOg0FTLZgzpRFuFLSoweol7SOkUBpAeYaNpAQM5gC9M9ykF66h7SWKm1nnO1I67B5ytGcy1D7TPpEOM6gQ2qMTUOLdXapwKBbxeM5CGE34M5C8vI7Ig6GtC@SKTnsOwrwUuYJje3AylubhKR6NRDHy0JUyts3nUclR954OepPdjUOaM6@AjMKKTTAuEcuU9WoJyIb0sCf2RQ5nO4ix5rodcVRmEQJIQ5gzrSCy2JE4yDtW7BiDaEc8eSQhRGVdw9TkTeBL9duprb0Lax6PkoMDnuzpU9@cYbglfTQ3as1vJt@kbXuf59x/5xmvCCA7bUEpjAN5sTMQN08g/Zgl2JP4ipjyJgclBwAyUswPqPFiC7J0mL7XRtmK3Nrz3aqKU15Mu/n9HTimyq/Q4NPspVvofmLHVlFferZphwqQK53JliOfEiIAlaWdhqiRJwZmvuxBVwIMsSgZWC/24NLV1zRP/iKv1pt3@fv/LL/sQ5cQe4dMKPkyYUux2fwA "Assembly (nasm, x64, Linux) – Try It Online") with a Linux `_start` caller that passes it the alphabet twice and makes write system calls before/after, so we can see that it correctly treats `u` as a vowel.
For more about the immediate bitmap strategy, and variations like using it branchlessly, see SO and two of my previous x86 answers:
* GCC turning a `switch()` statement into `bt` on a register, in [an SO answer](https://stackoverflow.com/questions/97987/advantage-of-switch-over-if-else-statement/32356125#32356125)
* [User Appreciation Challenge #1: Dennis ♦](https://codegolf.stackexchange.com/questions/123194/user-appreciation-challenge-1-dennis/123458#123458)
* [Vowels up, consonants down](https://codegolf.stackexchange.com/questions/201508/vowels-up-consonants-down/201568#201568)
---
#### Alternate version, same size
I had hoped to be able to use `xor al, 0x20` to save a byte vs. DL, but we need AL for efficient string-reading via `lodsb`. (We need a char from the string in a register to use as a source for `bt`.) We could start with `mov` there and use `stosb` to store, but that would have to be separate from a reg-reg XOR or AND, and still doesn't free up AL.
We could use `scasb` as a 1-byte `inc rdi`. Using `mov dl, [rdi]` to start, and saving the `-1` in the memory-dest addressing mode, and another byte from `xor al, 0x20` short-form, that's break-even for size and worse for efficiency (useless `scasb` reload). Or similar efficiency in 32-bit mode since we could use `inc edi` there.
```
;;; char *str /* RDI */,  size_t len /* RCX */
vowel_alt_caseflip_scasb:
    mov esi, 0x0208222      ; ASCII vowel bitmap, 1-indexed like ASCII codes are with 'a' = 0x61 not 0x60
    xor eax, eax            ; first vowel is not flipped
.loop:
    mov dl, [rdi]
    bt  esi, edx            ; if (bitmap & (1<<(c&31)))
    jnc .non_vowel
    xor [rdi], al           ; caseflip or not the current character
    xor al, 0x20            ; toggle state for the next
.non_vowel:
    scasb                   ; inc rdi   in one byte even on x86-64
    loop  .loop
    ret
```
[Answer]
# [Dyalog APL](https://dyalog.com), 23 bytes
```
1∘⎕C@(=\≠⍨)@(∊∘'aeiou')
```
`1∘⎕C` uppercase…
 `@(`…`)` at…
  `=\` XNOR scan (i.e. every other) of the  
  `≠⍨` XOR selfie (i.e. all 0s)
 `@(`…`)` at…
  `∊` member  
  `∘` of  
  `'aeiou'` vowels
[Try APL online!](https://tryapl.org/?clear&q=f%E2%86%901%E2%88%98%E2%8E%95C%40(%3D%5C%E2%89%A0%E2%8D%A8)%40(%E2%88%8A%E2%88%98%27aeiou%27)%20%E2%8B%84%20f%27abcdefghijklmnopqrstuvwxyz%27%20%E2%8B%84%20f%27aeiou%27&run "TryAPL")
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), 19 bytes[SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)
```
⊢-32×·≠`⊸<∊⟜"aeiou"
```
[Run online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAg4oqiLTMyw5fCt+KJoGDiirg84oiK4p+cImFlaW91IgoKRiAiYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoi)
Textbook use for under, but character arithmetic is much, much shorter. -10 from Marshall, then -3 from Marshall.
# Explanation
```
⊢-32×·≠`⊸<∊⟜"aeiou"
          ∊⟜"aeiou" bitmask of vowels
      ≠`            inequality scan(XOR scan)
        ⊸<          lesser than original bitmask?
  32×·              32 × that
⊢-                  subtract from the input
```
[Answer]
# Javascript, 57 5654 bytes
```
s=>s.replace(/[aeiou]/g,c=>(s=!s)?c.toUpperCase():c)
```
-1 Thanks to Patrick Stephansen.  
-2 Thanks to tsh.
-2 Thanks to l4m2.
Usage:
```
console.log((s=>s.replace(/[aeiou]/g,c=>(s=!s)?c.toUpperCase():c)))("string goes here"))
```
[Try it online](https://tio.run/##BcExDsIwDADAr7SdbAnSvVLKwBuYKgbLuCEoiiM78P1w96EfOVtu/Vr1JeOMw@PuwaQVYoH1IMn6fa7pwnEHj7PjjUPXR2tid3IB3BgHa3UtEoomOGHxbrmmKan49BaTBXH8AQ)
[Answer]
# [R](https://www.r-project.org/), 65 bytes
```
function(s){s[i]=s[i<-which(s%in%utf8ToInt("aeiou"))[!1:0]]-32;s}
```
[Try it online!](https://tio.run/##K/qfpmCj@z@tNC@5JDM/T6NYs7o4OjPWFkjY6JZnZCZnaBSrZuaplpakWYTke@aVaCglpmbmlyppakYrGloZxMbqGhtZF9f@z8wrCckPBarSSNNAVpyUnJKalp6RmZWdk5uXX1BYVFxSWlZeUVkFNEGTC4eupMScxLzk/MyiVHyqEoEAJP8fAA "R – Try It Online")
Takes input and outputs as vectors of char codes.
Some parts borrowed from [@Maël's R answer](https://codegolf.stackexchange.com/a/240492/55372).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 14 bytes
```
e€Øcn\<$a32^OỌ
```
[Try it online!](https://tio.run/##y0rNyan8/z/1UdOawzOS82JsVBKNjeL8H@7u@f//f0lGqkJhaWZytkJSUX55nkJafoVCVmluQbFCfllqkQJIOiexqlIhJT8dAA "Jelly – Try It Online")
```
e€Øc            For each input character: is it in Øc (vowels)?
                This gets a mask with 1s where vowels are, e.g.
                  “b x d e f h i z k o m u p”
                   0 0 0 1 0 0 1 0 0 1 0 1 0
    n\<$        scanl(≠, mask) < mask: This selects every other 1.
                  scanl(≠):  0 0 0 1 1 1 0 0 0 1 1 0 0
                  original:  0 0 0 1 0 0 1 0 0 1 0 1 0
                         <:  0 0 0 0 0 0 1 0 0 0 0 1 0
                
        a32     Replace all 1s by 32.
           ^O   XOR by ord(input string).
             Ọ  chr()
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 41 bytes
Uses the `-p` flag.
```
i=1
gsub(/[aeiou]/){[$&,$&.upcase][i^=1]}
```
[Try it online!](https://tio.run/##FchRCsIwDADQ/54iwhgK6tgBdpJSoZ2xy89SmkYo4tWN@vM@XtXUzWiZXRZNx8lHJNYwnV5@GM/DeNWyRsHg6bbM4W0W03pwP@74yG7DDp0V@IkV2oYVnbRKe4bMKPCPD5dGvItdyhc "Ruby – Try It Online")
[Answer]
# APOL, 35 bytes
`j(ƒ(i ¿(&(c(Ⓔ ↓(∋)) ≐(∈)) ∋ ↑(∋))))`
## Explanation
```
j(  Join a list to a string
  ƒ(  Listbuilder for
    i  Input
    ¿(  Returning if (called for each item in the input)
      &(  And (condition)
        c(  String contains
          Ⓔ  The constant string "aeiou"
          ↓(  To lowercase
            ∋  Current character
          )
        )
        ≐(  Is even
          ∈  For loop counter
        )
      )
      ∋  For loop item (executed if true)
      ↑(  To uppercase
        ∋  For loop item
      )
    )
  )
)
```
[Answer]
# [C (tcc)](http://savannah.nongnu.org/projects/tinycc), ~~174~~ 111 bytes
*Saved 63 bytes thanks to [manatwork](https://codegolf.stackexchange.com/users/4198/manatwork)*
```
i,b;f(char*a,int l){for(i=0;i<l;i++)if(a[i]==97||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u')if(b++%2)a[i]-=32;}
```
[Try it online!](https://tio.run/##Rc5BCsMgEAXQdTyFBIpaDZSUUor1JCELI4YOpFpEV0nObpVCs3t/4PPHdNGYnEFMcqbmpcNZC3ARL2ydfaCgLhKeiwTOGcxUDzAq9bhv20/Ekj/hoD@YSO1NnJ96Vk@duvZyz28NjjK8oqZuYj2MWOFWW/CplagpSwLfWNEnlG9KrA42puAk2vMX "C (tcc) – Try It Online")
### Unminified
```
i, b; 
f(char* a, int l) { 
    for (i = 0; i < l; i++)
        if (a[i] == 97 || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' || a[i] == 'u')
            if (b++ % 2)
                a[i] -= 32; 
}
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt) v2.0a0, 10 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
r\vÈpu gT°
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=2.0a0&code=clx2yHB1IGdUsA&input=ImFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6Ig)
[Answer]
# [J](http://jsoftware.com/), 33 31 bytes
```
(>~:/\)@e.&'aeiou'`(,:toupper)}
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/NezqrPRjNB1S9dTUE1Mz80vVEzR0rErySwsKUos0a/9rcqUmZ@QrpCmoV1RUgBWUghiJiWAiUf0/AA "J – Try It Online")
-2 thanks to Lynn
Kind of shockingly long, but best I could find so far...
[Answer]
# Python 2, 86 bytes
-26 thanks to ElPedro.
-2 thanks to Daniel.
```
c,S=0,''
for i in input():
 if i in'aeiou':S+=(i,i.upper())[c];c^=1
 else:S+=i
print S
```
**[Try it online](https://tio.run/##HclNDsIgEEDhPaeY3UAkRl3WcAqWRpOKYEcrjBTUenn8Sd7qezyXIcVNa05bs9KIIqQMBBS/cS1SdQIo/AV7T6liZxdGkqZlZfZZKrVz@607mLUAP07@t0lwpljAtob90Z18OA90uY63mPiep1Ifz9f8xg8)**
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 21 bytes
```
⭆Ｓ⎇№aeiouι§⁺↥ιιＬ⊞Ｏυιι
```
[Try it online!](https://tio.run/##JcpBCsIwEAXQq0hXU6gncCWuCooF9QBjOjbRmMRkprZePqZ0Mf/zeaM0RuXR5txF4xguXGo4YYDWBeF1Qt1srhQdxhkOXspbhWS8VM3GFNpz63qaoLOS4BYCRYWJYKHljuQG1tBJ0udiyD6CLFTXa@5yxrvq6TFo83zZt/PhExPL@J3mX96O9g8 "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
 Ｓ                      Input string
⭆                       Map over characters and join
   №                    Count of
         ι              Current character
    aeiou               In literal string `aeiou`
  ⎇                     If exists then
             ι          Current character
            ↥           Uppercase
           ⁺            Plus
              ι         Current character
          §             Indexed by
                   ι    Current character
                ⊞Ｏ      Pushed to
                  υ     Predefined empty list
               Ｌ        Length after push
                    ι   Otherwise current character
                        Implicitly print
```
[Answer]
# APL+WIN, 39 bytes
Prompts for string
```
⎕av[(⎕av⍳s)-32×1=i+i×≠\i←(s←⎕)∊'aeiou']
```
Index offset from lower to upper case changed in TIO from -32 to +48 to account for differences between APL+WIN and Dyalog atomic vectors.
[Try it online!Thanks to Dyalog Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcQJanP5BlyPWooz0NJJFYFq0Bph71bi7W1DaxODzd0DZTO/Pw9EedC2IygWo1ioEEUInmo44u9cTUzPxS9dj/QO1c/9O4oHwuECspOSU1LT0jMys7Jzcvv6CwqLiktKy8orJKHQA "APL (Dyalog Classic) – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 25 bytes
```
0T-1=`l`L`(.*?[aeiou]){2}
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7w3yBE19A2ISfBJ0FDT8s@OjE1M780VrPaqPb//8Sk5JTUtPSMzKzsnNy8/ILCouKS0rLyisoqLrAyrtzE7FSF1LLUokqF/JKM1CKFsvzy1ByF0oKC1KLkxOJUAA "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
(.*?[aeiou]){2}
```
Match the shortest possible substrings containing two vowels.
```
-1=
```
Only transliterate the last character of each match. (The `0` indicates that this modifier applies to the characters of the match rather than the matches themselves.)
```
T`l`L`
```
Upper case them.
[Answer]
# [Lua](https://www.lua.org/), 81 bytes
```
print(((...):gsub("[aeiou]",function(x)u=not u;return u and x or(x):upper()end)))
```
[Try it online!](https://tio.run/##HczBCcMwDAXQVYRPEhQPkJBJQg5u4wRDkI3qD26XV0PPD96F5N6saGfmGKNM5xtPDmvKpWILjwP66qUqD8GitRNmyx2mBEq606Bqt01oLRtL1l1E3H18vv/iBw "Lua – Try It Online")
Expects the input as first argument, prints output. Is one character shorter if `return` instead of `print` is used.
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), ~~148~~ 123 bytes
```
	S =INPUT
N	S ARB . L ANY('aeiou') . C REM . S	:F(O)
	X =1 - X
	C =CHAR(ORD(C) - 32) EQ(X)
	O =O L C	:(N)
O	OUTPUT =O S
END
```
[Try it online!](https://tio.run/##FY3LDoIwFETX7VfcHe1CEx8rki6wYDTRVgskuARFRZGqiK@fr9fVTE5OZtrGFrYeO0diEHO1ShOqsAZmAn1YQKA2zMvLynYeRyDBREvMmPhTpjklGYgB9CCjRIKQs8AwbUImObLRkEO0ZhlaGoTGMUl8pjjVRKcJHv1hTCMVOpcX2125Pxyr07m@NPZ6u7eP7vl6f74/ "SNOBOL4 (CSNOBOL4) – Try It Online")
## Explanation:
```
	S =INPUT			;* Read input
N	S ARB . L ANY('aeiou') . C REM . S	:F(O)
					;* Match in S:
					;* ARBitrary string (store as L), ANY single vowel (store as C)
					;* and the REMainder of the string (store as S).
					;* If there is no match, goto O.
	X =1 - X			;* Set X (initially treated as 0) to 1-X.
	C =CHAR(ORD(C) - 32) EQ(X)	;* if X == 0, set C to uppercase, otherwise do nothing.
	O =O L C	:(N)		;* append to O L and C, then goto N.
O	OUTPUT =O S			;* Output updated string
END
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 11 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
žMÃDεNÉiu]‡
```
[Try it online.](https://tio.run/##yy9OTMpM/f//6D7fw80u57b6He7MLI191LDw///EpOSU1LT0jMys7JzcvPyCwqLiktKy8orKKgA)
Or alternatively the `εNÉiu]` could be `2ι`u.ι`.
[Try it online.](https://tio.run/##yy9OTMpM/f//6D7fw80uRud2JpTqndv5qGHh//@JSckpqWnpGZlZ2Tm5efkFhUXFJaVl5RWVVQA)
**Explanation:**
```
žM         # Push the constant "aeiou"
  Ã        # Only keep those letters from the (implicit) input
   D       # Duplicate it
    ε      # Map the vowels in the copy to:
     NÉi   #  If the 0-based index is odd:
        u  #   Uppercase the vowel
    ]      # Close the if-statement and map
     ‡     # Transliterate the lowercase vowels to the alternating cased vowels
           # in the (implicit) input
           # (after which the result is output implicitly)
    2ι     # Uninterleave into two parts
      `    # Pop and push both parts separated to the stack
       u   # Uppercase the second part
        .ι # And interleave the two parts back again (to a list of characters)
```
[Answer]
# [Headascii](https://esolangs.org/wiki/Headass#Headascii), 142 bytes
```
----[]]]][]][++++^^^^D^^^^^+^{{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P};RP{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P};R]P}.!
```
[Try it here!](https://replit.com/@thejonymyster/HA23) Code will have to be copied, and executed like this:
```
erun("----[]]]][]][++++^^^^D^^^^^+^{{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P};RP{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P};R]P}.!","your input")
```
This one was fun, not sure if there's any room for serious golfing without a different approach. Maybe something with an oscillator to decide whether to uppercase a given vowel? But the 3 main storage registers are used up for comparison, storing -32 (uppercase constant), and storing 97 (ascii a, first vowel). So I'm not sure where the constant would be held. I'll take another whack at it sometime though.
```
----[]]]][]][++++^^^^D^^^^^+^ Constants -32 and 97
----                          -4
    []]]]                     *4
         []][                 *2, and store
             ++++             4
                 ^^^^         *4
                     D^^^^^+^ *6+1, already stored
{{...};RP{...};R]P}. The rest of block 0
{                 }  Loop
 {   }               Loop until a vowel is found
      ;RP            Concatenate it to the string register
         {   }       Loop until a vowel is found
              ;R]P   Subtract 32 (uppercase) and concatenate to string register
                   . Block separator
{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P} First loop
{                                                 } Loop
 D^(U)                                              If byte is "a",
       ++++(R)                                      "e"
               ++++(R)                              "i"
                       ++++++(R)                    "o"
                                 ++++++(R)          or "u",
      :       :       :         :         :           Exit loop.
                                                    Else,
                                           R()        If byte is null (i.e. string ended)
                                              +E        Go to block 1
                                                :     Else,
                                                 P      Concatenate byte to string register
{D^(U):++++(R):++++(R):++++++(R):++++++(R):R()+E:P} Second Loop is identical to the first
                                                    Avoiding two identical loops would be
                                                    a major golfing opportunity
!  Block 1
!  Print string register, end of execution
```
[Answer]
# [Factor](https://factorcode.org/), 65 bytes
```
[ dup [ "aeiou"in? ] arg-where <odds> over [ 32 - ] change-nths ]
```
[Try it online!](https://tio.run/##RYoxEoIwEAB7XnGTHgvt1NHSsbFhrBiKMzlIJCRwSQD9fKSz2WJ3W5TRc35W98ftCD2xIwuBYtgwJXKSwo7WyBhgwKj/FoyHU1EIfElFbafNu7eD8@PEIaZ5WT9fkWtQaYQaBJLxSRh3hQaQu3LRxARnr1S4gJ@Jt@mwh3LLUqPrqHRRB2iyRGthZONi/gE "Factor – Try It Online")
## Explanation
Get the indices of the vowels from the input, take the odd-indexed elements of those, then subtract 32 from the input at those indices. `change-nths` is a mutating word which has the usual `( indices seq -- )` stack effect which is why we need an extra copy on the stack before we call it.
```
                          ! "abcdefghijklmnopqrstuvwxyz"
dup                       ! "abcdefghijklmnopqrstuvwxyz" "abcdefghijklmnopqrstuvwxyz"
[ "aeiou"in? ] arg-where  ! "abcdefghijklmnopqrstuvwxyz" V{ 0 4 8 14 20 }
<odds>                    ! "abcdefghijklmnopqrstuvwxyz" { 4 14 }
over                      ! "abcdefghijklmnopqrstuvwxyz" { 4 14 } "abcdefghijklmnopqrstuvwxyz"
[ 32 - ] change-nths      ! "abcdEfghijklmnOpqrstuvwxyz"
```
[Answer]
# [Uiua](https://uiua.org), 17 [bytes](https://codegolf.stackexchange.com/a/265917/97916)
```
-×32×\≠.∊,"aeiou"
```
[Try it!](https://uiua.org/pad?src=ZiDihpAgLcOXMzLDl1ziiaAu4oiKLCJhZWlvdSIKCmYgImFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6IgpmICJhZWlvdSIK)
Port of Razetime's [BQN answer](https://codegolf.stackexchange.com/a/240488/97916).
```
-×32×\≠.∊,"aeiou"
        ∊,"aeiou"  # mask of where vowels are in input
       .           # duplicate
     \≠            # inequality scan
    ×              # multiply
 ×32               # multiply by 32
-                  # subtract (capitalize)
```
]