diff --git a/HW4_Zolotikov/protein_tool.py b/HW4_Zolotikov/protein_tool.py
new file mode 100644
index 0000000..e7204b1
--- /dev/null
+++ b/HW4_Zolotikov/protein_tool.py
@@ -0,0 +1,200 @@
+from typing import Dict, List, Union
+
+# Dorzhi
+def to_rna(seq: str, rna_dict: Dict[str, str] = {'F': 'UUY', 'L': 'YUN', 'I': 'AUH', 'M': 'AUG',
+ 'V': 'GUN', 'S': 'WSN', 'P': 'CCN', 'T': 'ACN',
+ 'A': 'GCN', 'Y': 'UAY', 'H': 'CAY', 'Q': 'CAR',
+ 'N': 'AAY', 'K': 'AAR', 'D': 'GAY', 'E': 'GAR',
+ 'C': 'UGY', 'R': 'MGN', 'G': 'GGN', 'W': 'UGG'}) -> str:
+ """
+ Converts an amino acid sequence into an RNA sequence.
+
+ Parameters
+ ----------
+ seq : str
+ Amino acid sequence.
+ rna_dict : dict
+ Dictionary defining the correspondence of amino acids
+ to RNA triplets (default, standard code).
+ Returns
+ -------
+ str
+ RNA sequence.
+
+ """
+ result = ''.join(rna_dict[base] for base in seq)
+ return result
+
+
+def define_charge(seq: str, positive_charge: List[str] = ['R', 'K', 'H'],
+ negative_charge: List[str] = ['D', 'E']) -> Dict[str, int]:
+ """
+ Counts the number of amino acids with positive charge, negative charge,
+ and neutral amino acids in the sequence.
+
+ Parameters
+ ----------
+ seq : str
+ Amino acid sequence (string).
+ positive_charge : list
+ List of amino acids with positive charge (default is ['R', 'K', 'H']).
+ negative_charge : list
+ List of amino acids with negative charge (default is ['D', 'E']).
+
+ Returns
+ -------
+ dict
+ A dictionary containing the counts of amino acids and their labels:
+ - 'Positive' for amino acids with positive charge.
+ - 'Negative' for amino acids with negative charge.
+ - 'Neutral' for neutral amino acids.
+ """
+ positive_count = 0
+ negative_count = 0
+ neutral_count = 0
+
+ for aa in seq:
+ if aa in positive_charge:
+ positive_count += 1
+ elif aa in negative_charge:
+ negative_count += 1
+ else:
+ neutral_count += 1
+
+ result = {
+ 'Positive': positive_count,
+ 'Negative': negative_count,
+ 'Neutral': neutral_count
+ }
+ return result
+
+
+# Ustin
+POLAR_AA = {'D', 'E', 'R', 'K', 'H', 'N', 'Q', 'S', 'T', 'Y', 'C'}
+NONPOLAR_AA = {'A', 'G', 'V', 'L', 'I', 'P', 'F', 'M', 'W'}
+DNA_AA = {'F': 'TTY', 'L': '(TTR or CTN)', 'I': 'ATH', 'M': 'ATG', 'V': 'GTN', 'S': '(TCN or AGY)', 'P': 'CCN', 'T': 'ACN', 'A': 'GCN',
+ 'Y': 'TAY', 'H': 'CAY', 'Q': 'CAR', 'N': 'AAY', 'K': 'AAR', 'D': 'GAY', 'E': 'GAR', 'C': 'TGY', 'W': '(CGN or AGR)', 'R': 'AGY', 'G': 'GGN'}
+
+
+def define_polarity(seq: str) -> Dict[str, int]:
+ """
+ Counts polar and nonpolar aminoacids in aminoacid sequences.
+
+ Arguments:
+ str: sequence to count polar and nonpolar aminoacids.
+
+ Return:
+ Dict[str, int]:
+ Dictionary with keys 'Polar', 'Nonpolar' and values of quantity of according groups in sequence.
+ """
+ polarity_count = {'Polar': 0, 'Nonpolar': 0}
+ for aminoacid in seq:
+ if aminoacid in POLAR_AA:
+ polarity_count['Polar'] += 1
+ else:
+ polarity_count['Nonpolar'] += 1
+ return polarity_count
+
+
+def to_dna(seq: str) -> str:
+ """
+ Transforms aminoacid sequence to DNA sequence
+
+ Arguments
+ ---------
+ str: aminoacid sequence to transform to DNA sequence.
+
+ Return
+ ------
+ str: according DNA sequence.
+ """
+ sequence_dna = []
+ for aminoacid in seq:
+ sequence_dna.append(DNA_AA[aminoacid])
+ return ''.join(sequence_dna)
+
+
+#Margarita
+ABBREVIATION_THREE_TO_ONE = {'ALA':'A', 'CYS':'C', 'ASP':'D', 'GLU':'E', 'PHE':'F',
+ 'GLY':'G', 'HIS':'H', 'ILE':'I', 'LYS':'K', 'LEU':'L',
+ 'MET':'M', 'ASN':'N', 'PRO':'P', 'GLN':'Q', 'ARG':'R',
+ 'SER':'S', 'TRE':'T', 'VAL':'V', 'TRP':'W', 'TYR':'Y'}
+AMINO_ACIDS_ONE_LETTER = {'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K',
+ 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V',
+ 'W', 'Y'}
+AMINO_ACIDS_THREE_LETTER = {'ALA', 'CYS', 'ASP', 'GLU', 'PHE',
+ 'GLY', 'HIS', 'ILE', 'LYS', 'LEU',
+ 'MET', 'ASN', 'PRO', 'GLN', 'ARG',
+ 'SER', 'TRE', 'VAL', 'TRP', 'TYR'}
+
+import sys
+
+def change_abbreviation(seq: str) -> str:
+ """
+ Changes the amino acid abbreviation from three-letter to one-letter.
+
+ Parametrs
+ ----------
+ seq : str
+ Amino acid sequence in three-letter form.
+ Returns
+ -------
+ str
+ Amino acid sequence in one-letter form
+
+ """
+ one_letter_seq = [ABBREVIATION_THREE_TO_ONE[amino_acid] for amino_acid in seq.split("-")]
+ return "".join(one_letter_seq)
+
+def is_correct_seq(seq: str) -> bool:
+ """
+ Check the sequence for extraneous characters.
+
+ Parametrs
+ ----------
+ seq : str
+ Amino acid sequence.
+ Returns
+ -------
+ bool
+ TRUE - if there is no extraneous characters, FALSE - if there is extraneous characters.
+
+ """
+ unique_amino_acids = set(seq)
+ unique_amino_acids_three = set(seq.split("-"))
+ check = unique_amino_acids <= AMINO_ACIDS_ONE_LETTER or unique_amino_acids_three <= AMINO_ACIDS_THREE_LETTER
+ return check
+
+def protein_tool(*args: str) -> Union[str, List[Union[Dict[str, int], str]]]:
+ """
+ Receives a request from the user and runs the desired function.
+
+ Parametrs
+ ----------
+ seq : str
+ Amino acid sequences.
+ operation : str
+ Type of user's request.
+ Returns
+ -------
+ str
+ If a single sequence is supplied, outputs the result as a string or or identify a problem with a specific sequence.
+ list
+ If several sequences are supplied, outputs the result as a list.
+
+ """
+ *seqs, operation = args
+ operations = {'one letter':change_abbreviation, 'RNA':to_rna, 'DNA':to_dna, 'charge':define_charge, 'polarity':define_polarity}
+ output = []
+ for seq in seqs:
+ answer = is_correct_seq(seq.upper())
+ if answer:
+ function_output = operations[operation](seq.upper())
+ output.append(function_output)
+ else:
+ print(f'Something wrong with {seq}', file=sys.stderr)
+ continue
+ if len(output) == 1 and (operation == 'RNA' or operation == 'DNA' or operation == 'one letter'):
+ return ''.join(output)
+ else:
+ return output
diff --git a/HW4_Zolotikov/team-HW4.jpg b/HW4_Zolotikov/team-HW4.jpg
new file mode 100644
index 0000000..dc6944a
Binary files /dev/null and b/HW4_Zolotikov/team-HW4.jpg differ
diff --git a/README.md b/README.md
index f918170..9c6db5c 100644
--- a/README.md
+++ b/README.md
@@ -1,65 +1,138 @@
-# HW 4. Functions 2
-> *This is the repo for the fourth homework of the BI Python 2023 course*
-
-### Homework description
-
-На прошлой неделе вы делали утилиту для работы с последовательностями нуклеиновых кислот (с весьма строгим ТЗ). Пришло время для чего-то более самостоятельного.
-
-#### Основное задание
-
-
-Напишите утилиту для работы с последовательностями белков. Там должно быть минимум 5 различных операций, должна быть какая-то точка входа через которую пользователь будет всё это дело использовать. На этом, по сути, всё. Всё целиком зависит от вашей фантазии и креативности. Можете опираться на ДЗ №2 и №3.
-
-Самая главная часть задания - это файл `README.md`. Сделайте краткое введение, напишите описание тула, приведите документацию по использованию со списком аргументов. Добавьте примеры использования. Возможно, вы захотите сделать секцию Troubleshooting. ***Почему это нужно?*** В этот раз проверяющий не будет знать того, как должен работать ваш тул. Это ваш авторский код. Даже самая прекрасная функциональность, не будучи отраженной в README, скорее всего останется незамеченной. README - это ваш способ познакомить пользователя с тулом, показать всё лучше и обосновать, почему именно ваша команда должна получить наивысший балл.
-
-Есть люди которые, любят писать документации, а есть те - кто не любит. Найдите в вашей команде того, кто любит. И в будущем в своих рабочих проектах всегда держите рядом такого человек (или будьте им).
-
-Примеры некоторых README, которыми можно вдохновляться:
-
-- [MetaFX](https://github.com/ctlab/metafx), тул Артёма Иванова. Там еще и [wiki](https://github.com/ctlab/metafx/wiki) крутое.
-- [samovar](https://github.com/nvaulin/samovar)
-- [MetaGEM](https://github.com/franciscozorrilla/metaGEM)
-- [Pharokka](https://github.com/gbouras13/pharokka)
-
-Типовые секции, на которые стоит обратить внимание: Title, Overview, Usage, Options, Examples, Troubleshooting, Contacts.
-
-**Tехническое требование к заданию.**
-
-Это задание будет выполняться в командах по 3 человека. Каждый из членов команды должен внести ***как минимум*** 2 функции. Каждое внесение функции должно сопровождаться коммитом с осмысленным описанием коммита. Ниже приведена последовательность действий для успешного выполнения задания (аналогично ДЗ №2):
-
-1. Посмотрите состав своей команды здесь ([**ССЫЛКА**](https://docs.google.com/spreadsheets/d/1KMBBBu8LqauRpDJb0v1ldPwpvzNn8-KakcHexAcqLsE/edit?usp=sharing)).
-2. Тимлид делает форк данного репозитория. **В форке создает ветку `HW4_`, в ветке создает папку `HW4_`, в этой папке вы всё делаете.**
-3. Члены команды могут либо делать свои форки, либо работать в репозитории тимлида в качестве колабораторов ("contributors"). В любом случае делаете клоны => пишите код локально => пушите.
-4. В конце тимлид делайет pull-request из `HW4_` своего репозитория в `main` этого.
-
-
-А также:
-- Сопроводите программу лучшим `README.md` файлом в вашей жизни (на английском языке).
-- В этом ДЗ проблемы с качеством кода (нейминги, пустые строки, анноатции типов, док.стринги, пробелы) могут привести к снижению балла. Воспользуйтесь линтерами чтобы себя обезопасить. IDE по типу PyCharm или VSCode имеют фунцонал по авто-исправлению многих проблем такого рода.
-
-Автотестов на GitHub в этом ДЗ нет, но вы можете прогнать линтеры на качество кода локально (как в ДЗ №3, подробнее читайте [тут](https://plausible-cannon-091.notion.site/Code-auto-checks-02b2ea69c1d545fca07b50ce5933ed5f?pvs=4)).
-
-- Программа должна сохранять регистр символов.
-- Программа должна работать только с последовательностями белков.
-- Запрещается использование сторонних модулей.
-
-
-### Форма сдачи
-
-Прикрепите ссылку на pull-request тимлида в Google Class (можете сделать от лица каждого члена команды, но это не обязательно).
-
-
-### Pазбалловка
-
-- За каждую из 5 операций - максимум **1.5 балла**
-- За README - максимум **2.5 балла**
-- Если вы не внесли как минимум 2 функции от себя, вы получаете 0 баллов (на баллы остальных членов команды это не влияет).
-- За фото созвона в README можно получить 0.2 доп. балла (но не более 10 баллов суммарно)
-
-
-
-### **Предполагаемый учебный результат**
-
-Это задание позволит вам проявить креативность и учиться быть не только кодером, но и автором. Также это задание поможет окончательно закрепить материал по функциям который мы прошли.
-
-Удачи! ✨✨
+# Protein Tool
+
+This Python utility allows you to work with protein sequences. You can perform various operations on protein sequences, such as translating them into RNA, DNA sequences, counting charged, uncharged amino acids and hydrophobic, hydrophilic amino acids in sequence.
+
+## Table of Contents
+
+- [Installation](#installation)
+- [Functions](#functions)
+- [Troubleshooting](#troubleshooting)
+- [Authors](#authors)
+
+## Installation
+
+You can clone this repository or download the source code.
+
+##### Requirements:
+
+Python3
+
+## Functions
+The program can process one or more amino acid sequences written in a one-letter format and also does not take into account the size of the input and output letters. Tool can work with amino acids which are mentioned in table below.
+| One letter amino acid | Three letter amino acid |
+|-------------------------------|-----------------------------|
+| A | Ala |
+| C | Cys |
+| D | Asp |
+| E | Glu |
+| F | Phe |
+| G | Gly |
+| H | His |
+| I | Ile |
+| K | Lys |
+| L | Leu |
+| M | Met |
+| N | Asn |
+| P | Pro |
+| Q | Gln |
+| R | Arg |
+| S | Ser |
+| T | Tre |
+| V | Val |
+| W | Trp |
+| Y | Tyr |
+### change_abbreviation(seq)
+Name's operation: "one letter".
+Sequences are written in three-letter format, can be converted to one-letter format. Amino acids must be separeted by "-".
+
+- seq: Amino acid sequence (str).
+- Returns: string of one-letter format of sequence or list of sequences.
+##### Example:
+```python
+protein_tool('aLa-CyS', 'one letter') #input ignore letter's size
+'AC'
+protein_tool('Ala-Cys', 'Ala', 'one letter')
+['AC', 'A']
+```
+### to_dna(seq)
+Name's operation: "DNA".
+Transforms aminoacid sequence to according DNA sequence.
+
+Arguments:
+- sequence: aminoacid sequence to transform into DNA.
+
+Returns:
+- String of according DNA sequence.
+##### Example:
+```python
+protein_tool('AsDr', 'DNA')
+'GCN(TCN or AGY)GAYAGY'
+protein_tool('YWNGAS', 'DNA')
+'TAY(CGN or AGR)AAYGGNGCN(TCN or AGY)'
+```
+### to_rna(seq, rna_dict)
+Name's operation: "RNA".
+Translates an amino acid sequence into an RNA sequence.
+
+Arguments:
+- seq: Amino acid sequence (str).
+- rna_dict: Dictionary defining the correspondence of amino acids to RNA triplets (default, standard code).
+
+Returns:
+- String or list of RNA sequences.
+##### Example:
+```python
+protein_tool('FM', 'RNA')
+'UUYAUG'
+```
+### define_charge(seq, positive_charge, negative_charge)
+Name's operation: "charge".
+Counts the number of amino acids with positive charge, negative charge, and neutral amino acids in the sequence.
+
+Arguments:
+- seq: Amino acid sequence (string).
+- positive_charge: List of amino acids with positive charge (default is ['R', 'K', 'H']).
+- negative_charge: List of amino acids with negative charge (default is ['D', 'E']).
+
+Returns:
+- Dictionary (or list of dictionaries) containing the counts of amino acids and their labels.
+
+##### Example:
+```python
+protein_tool('ASDRKHDE', 'charge')
+{'Positive': 3, 'Negative': 3, 'Neutral': 2}
+```
+### define_polarity(seq)
+Name's operation: "polarity".
+Counts polar and nonpolar aminoacids in sequence.
+
+Arguments:
+- sequence: sequence in which we count polar and nonpolar aminoacids. \newline
+
+Returns:
+- Dictionary with keys 'Polar', 'Nonpolar' and appropriate aminoacid counters as values.
+##### Example:
+```python
+protein_tool('ASDR', 'polarity')
+[{'Polar': 3, 'Nonpolar': 1}]
+```
+## Troubleshooting
+Sequences containing characters that do not code for amino acids will be removed from the analysis. The program will write an error and display the sequence with which the problem occurred.
+##### Example:
+```python
+protein_tool('ASDR', 'ala1', 'polarity')
+Something wrong with ala1
+[{'Polar': 3, 'Nonpolar': 1}]
+```
+Sequences specified in a three-letter format are accepted only by the function for changing the recording format. In other cases, the program will produce either an error or incorrect calculations.
+##### Example:
+```python
+protein_tool('AGFHGF', 'Ala-ala', 'DNA') # key error "-"
+protein_tool('AGFHGF', 'Ala-ala', 'polarity')
+[{'Polar': 1, 'Nonpolar': 5}, {'Polar': 0, 'Nonpolar': 7}] # "-" is counted as non-polar
+```
+## Authors
+- Dorzhi Badmadashiev: to_rna, define_charge functions
+- Ustin Zolotikov: to_dna, define_polarity functions
+- Margarita Beskrovnaia: main, is_correct_seq, change_abbreviation functions
+