这项挑战是对2017年奥斯卡最佳影片奖得主La La Land Moonlight的致敬!
编写一个函数/程序,该函数/程序接受仅包含字母的字符串[A-Za-z]
,该字符串是日常句子.,'?
和空格中常见的四个符号 ,并以La La Land的样式输出该字符串。
更具体地说,将字母带到第一个元音组,包括第一个,然后打印/输出两次,每次添加一个空格,然后打印/输出整个字符串。y是这个挑战中的元音。标点符号和大写字母应保留。
您可以假定所有字符串至少包含一个元音,并且所有字符串均以字母开头。
测试用例:
Land
La La Land
Moonlight
Moo Moo Moonlight
quEueIng
quEueI quEueI quEueIng
This isn't a single word.
Thi Thi This isn't a single word.
It's fun to play golf
I I It's fun to play golf
Ooo
Ooo Ooo Ooo
I'm okay
I I I'm okay
Hmm, no. There will be at least one vowel, but it can be anywhere.
Hmm, no Hmm, no Hmm, no. There will be at least one vowel, but it can be anywhere.
Why is y a vowel?
Why Why Why is y a vowel?
MOONLIGHT
。只是为了好玩:Why did the chicken cross the road?