diff --git a/ParseFaculty/Faculty.py b/ParseFaculty/Faculty.py new file mode 100644 index 0000000..b671e6d --- /dev/null +++ b/ParseFaculty/Faculty.py @@ -0,0 +1,23 @@ +import string +def parse_faculty(text): + """ + Функція зчитування рядка факультету та виведення у короткому вигляді + + :param text: data type: string + format: Word word word. Word + examples: Факультет прикладної математики. Денна + Факультет інформаціонної обчислювальної техніки. Заочна + :return: data type: string + format: XXX + examples: ФПМ + ФІОТ + """ + words = [] + words = text.split(".") + contains = words[0].split() + letters = [] + for word in contains: + letters.append(word[0].upper()) + result = "" + result = result.join(letters) + return result \ No newline at end of file diff --git a/ParseFaculty/__init__.py b/ParseFaculty/__init__.py new file mode 100644 index 0000000..e69de29