Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions ParseFaculty/Faculty.py
Original file line number Diff line number Diff line change
@@ -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
Empty file added ParseFaculty/__init__.py
Empty file.