The language used is C#.
On a production line in a factory there is a printer that prints labels for boxes. The printer has to use colours on these labels, for the sake of simplicity are named with letters from a to m.
Colours that are used are recorded in a control string.
As an example, a “good” control string would be "aaabbbbhaijjjm". This means that the printer used color a 3 times, color b 4 times, color h once, color a once, etc…
When there is a problem (caused by unknown causes), an “erroneous” control string is produced. For example, "aaaxbbbbyyhwawiwjjjwwm".
You need to write a function printer_error which when given a control string, similar to the ones above, will produce a string representing a rational whose numerator is the number of errors, and a denominator that is the length of the control string.
Don’t simplify this fraction to a simpler expression.
-The string always has a length greater or equal to one.
-The string only contains letters from a to z
error_printer("aaabbbbhaijjjm") # "0/14"
error_printer("aaaxbbbbyyhwawiwjjjwwm") # "8/22"