# Task 1. Automation of Production Activities

Task text. When designing the oil cleaning system, the technical task was to determine the stage of comparing oil mixtures according to specified quality criteria from the Star and Shine extraction sites. Over one time period, ten iterations of comparison are conducted, with 1589.883 liters from each site participating in each iteration. If the fuel from a site scores two or fewer quality points in an iteration, it is stored in the LV-426 storage; otherwise, it is stored in the HV-22 storage. After processing the data, both sites receive rating points based on the comparison results:

- Higher quality - 3 points.
- Equal quality - 1 point.
- Lower quality - 0 points.

Perform (1) the calculation of the amount of oil mixture in the HV-22 and LV-426 storage tanks after processing the test data set and (2) the calculation of the rating points earned by the Shine and Star sites. The test data set is presented below, with the following syntax: Name of the tank from the Shine site, its quality points: quality points of the oil mixture in the tank from the Star site, its name.

["ShineA 0:3 StarBB", "ShineBA 2:1 Star3", "ShineBB 1:1 StarU", "ShineOO 4:1 Star-GS", "ShineNG 2:3 StarRt", "F-Shine 2:3 StarDv", "ShineVos 3:2 StarTr", "ShinePS 3:3 StarDS", "ShineHL 4:4 StarAV", "ShineM-ET 0:0 Star-vOS"]
Solution to the problem. To solve this, it is necessary to define four counter variables - star, shine, HV_22, and LV_426 to record the required parameters. Next, it is necessary to separate the characters in the original list that can be converted to numerical values from the rest. For this, the appropriate method (split() in Python or similar in other languages) is applied - you need to address the elements within the range of the length of the original list. Since the delimiter will be a space character, all elements will be decomposed into three, for example: ["ShineA", "0:3", "StarBB"], which will allow addressing the numbers of the second elements by the indices of a two-dimensional list. Then, using conditional operators, it is necessary to sequentially add the required values to the previously declared variables.

Example of program implementation in Python:

```
lst = ["ShineA 0:3 StarBB", "...", "ShineM-ET 0:0 Star-voC"]
oil = 1589.883
star, shine, HV_22, LV_426 = 0, 0, 0, 0
for elem in range(len(lst)):
    s = lst[elem].split()
```

```
if int(s[1][0]) > 2:
        HV_22 += oil
    else:
        LV_426 += oil
    if int(s[1][2]) > 2:
        HV_22 += oil
    else:
        LV_426 += oil
    if int(s[1][0]) > int(s[1][2]):
        shine += 3
    if int(s[1][0]) < int(s[1][2]):
        star += 3
    if int(s[1][0]) == int(s[1][2]):
        shine += 1
        star += 1
print(f'HV-22: {HV_22} liters, LV-426: {LV_426} liters')
print(f'Star: {star} points, Shine: {shine} points')
```