Skip to main content
added 58 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

Python 3, 128 124 122122 119 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in'aeiou':
   return a[:a.find(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

edit 2: saved two more bytes thanks to @surculose-sputum

edit 3: another three bytes thanks to @surculose-sputum

Python 3, 128 124 122 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in'aeiou':
   return a[:a.find(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

edit 2: saved two more bytes thanks to @surculose-sputum

Python 3, 128 124 122 119 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in'aeiou':return a[:a.find(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

edit 2: saved two more bytes thanks to @surculose-sputum

edit 3: another three bytes thanks to @surculose-sputum

added 67 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

Python 3, 128 124124 122 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in 'aeiou'in'aeiou':
   return a[:a.indexfind(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

edit 2: saved two more bytes thanks to @surculose-sputum

Python 3, 128 124 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in 'aeiou':
   return a[:a.index(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

Python 3, 128 124 122 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in'aeiou':
   return a[:a.find(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

edit 2: saved two more bytes thanks to @surculose-sputum

added 65 characters in body
Source Link
Dion
  • 4k
  • 12
  • 42

Python 3, 128128 124 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in 'aeiou':
   return a[:a.index(i)+1+1]
print(a[:g(a)]+b[:g+g(b)]+c[0]+'+c[0]+'-'+d[2:])

Try it online!Try it online!

Pretty new, probably extremely overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

Python 3, 128 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in 'aeiou':
   return a.index(i)+1
print(a[:g(a)]+b[:g(b)]+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably extremely overcomplicated.

Python 3, 128 124 bytes

a,b,c,d=input().split()
def g(a):
 for i in a:
  if i in 'aeiou':
   return a[:a.index(i)+1]
print(g(a)+g(b)+c[0]+'-'+d[2:])

Try it online!

Pretty new, probably overcomplicated.

edit 1: saved four bytes by moving a part from print() to function

Source Link
Dion
  • 4k
  • 12
  • 42
Loading