我的功能是:
vowels=('a','e','i','o','u')
prefixes=('bl','br','ch','cl','cr','dr','fl','fr','gl','gr','kl','ph','pl','sh','sl','sp','sr','st','th','tr','wh','wr')
def convertToPigLatin(word):
first_prefix=word[0:2]
first_letter=word[0]
if first_prefix in prefixes:
return word[2:]+word[0:2]+'ay'
if first_letter in vowels:
return word+'yay'
else:
return word[1:]+word[0]+'ay'
现在我将输入什么以及在何处使其循环并在用户未输入任何内容时中断
月关宝盒
相关分类