Skip to main content
fixed explanation formatting to remove horizontal scrollbar
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384

05AB1E, 11 bytes

žMÃDεNÉiu]‡

Try it online.

Or alternatively the εNÉiu] could be 2ι`u.ι.

Try it online.

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
           # 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)

05AB1E, 11 bytes

žMÃDεNÉiu]‡

Try it online.

Or alternatively the εNÉiu] could be 2ι`u.ι.

Try it online.

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)

05AB1E, 11 bytes

žMÃDεNÉiu]‡

Try it online.

Or alternatively the εNÉiu] could be 2ι`u.ι.

Try it online.

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)
Source Link
Kevin Cruijssen
  • 131.5k
  • 13
  • 144
  • 384

05AB1E, 11 bytes

žMÃDεNÉiu]‡

Try it online.

Or alternatively the εNÉiu] could be 2ι`u.ι.

Try it online.

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)