def cat_latin_word(text):
"""converts the english into cat latin"""
constant = "bcdfghjklmnprstvwxyzBCDFGHJKLMNPQRSTVWXYZ"
result = []
for word in text.split():
if word[0] in constant:
word = (str(word)[1:] + str(word)[0] + "eeoow")
result.append(word)
elif word == "q":
word = ("oodbyegeeoow")
result.append(word)
else:
word = (str(word) + "meeoow")
result.append(word)
return ' '.join(result)
def cat_latin_from_sentence(text):
"""call the sub cat latin word sub function"""
return cat_latin_word(text)
def main():
"""Calling for the main function"""
text = input("Enter the english sentence: ")
print("cat latin =" + " "+ cat_latin_from_sentence(text))
答案 0 :(得分:-1)
在这里,您不必发布实际的Pylint
消息就不得不猜测一下,但是也许是在抱怨您特别想念module docstring吗?也就是说,在文件顶部的docstring
描述了整个模块的用途,而不是您所显示的功能级别的docstrings
。