Skip to main content
added 22 characters in body; deleted 4 characters in body
Source Link

Python 2, 8886 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%2];c+=1[c];c^=1
 else:S+=i
print S

Try it onlineTry it online

Python 2, 88 bytes

-26 thanks to ElPedro.

c,S=0,''
for i in input():
 if i in'aeiou':S+=(i,i.upper())[c%2];c+=1
 else:S+=i
print S

Try it online

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

deleted 25 characters in body
Source Link

Python 2, 11488 bytes

-26 thanks to ElPedro.

def f(sc,c=0S=0,S=''):''
 for i in sinput():
  if i in'aeiou':
   if c%2:S+=iS+=(i,i.upper()
   else:S+=i
   c+=1)[c%2];c+=1
  else:S+=i
 print S

Try it onlineTry it online

Python 2, 114 bytes

def f(s,c=0,S=''):
 for i in s:
  if i in'aeiou':
   if c%2:S+=i.upper()
   else:S+=i
   c+=1
  else:S+=i
 print S

Try it online

Python 2, 88 bytes

-26 thanks to ElPedro.

c,S=0,''
for i in input():
 if i in'aeiou':S+=(i,i.upper())[c%2];c+=1
 else:S+=i
print S

Try it online

Source Link

Python 2, 114 bytes

def f(s,c=0,S=''):
 for i in s:
  if i in'aeiou':
   if c%2:S+=i.upper()
   else:S+=i
   c+=1
  else:S+=i
 print S

Try it online