posted by Chealse on .
How do you change your domain name?
Any websites you can suggest that could change my website's domain name for FREE?
I doubt you can do anything like that "for free" -- sorry.
Another tutor may have some ideas, but I know of none.
(c) Run length encoding is very simple form of data compression that is best illustrated with an example. Suppose you want to transmit the string AAAAABBBBBBBBCC to a friend. Instead of sending this string as is, you could compress it to 5A8B2C and send the smaller string. The smaller string will tell your friend that the original string consists of 5 A¡¯s followed by 8 B¡¯s followed by 2 C¡¯s. This type of compression is called run length encoding because runs in the data (i.e., contiguous subsequences consising of the same character) can be encoded as a count followed by the data item. For this problem you are asked write a program that reads input consisting of a string that is run length encoded. Your program is expected to then output the original (i.e., unencoded) string. For example, if the input to your program is
5 A 8 B 2 C 0
then your program should produce the string AAAAABBBBBBBBCC as output. The 0 at the end of your input is being used to indicate that there is no further input. Later, when your Python skills are more developed, you will be able to read 5A8B2C as a single string and break it up into its constituent parts. For now, you can assume that the input is nicely speciﬁed in the format:
count1 string1 count2 string2 ... ... countk stringk 0
Corresponding to the above input, your program should produce a string that starts with count1 copies of string1, followed by count2 copies of string2, etc. As in previous problems, you can assume that there will be no errors in the input. Also, as in previous problems, your program should not produce a prompt when waiting for input and it should not produce any output except the answer.