Правя тази тема за въпроси, свързани със съответние упражнения.
Моят първи въпрос е:
На задача 2.2. def plot_complex_numbers(numbers, colors):
това ли е очакваният резултат:
Някой успя ли да реши 4-та задача?
One application of algebra and basic math can be compression. This is a way to save data in less space than it originally takes. The most basic form of compression is called run-length encoding.
Write a function that encodes a given text. Write another one that decodes.
We can see that RLE is not very useful in the general case. But it can be extremely useful if we have very few symbols. An example of this can be DNA and protein sequences. DNA code, for example, has only 4 characters.
Test your encoding and decoding functions on a DNA sequence (you can look up some on the Internet). Measure how much your data is compressed relative to the original.