The Challenge
Given a non-empty string containing only lowercase or uppercase letters and no spaces:
Sum up the ASCII values for each character instance in the input string.
The sum will be converted to binary.
And, the result will be the number of ones in the binary value.
Input example:
abcDeFAaB
Sum up the ASCII values for each character instance, so for this example:
97+98+99+68+101+70+65+97+66 = 761
.Convert the sum (
761
) to binary. This will give1011111001
.The final result will be the number of ones (
7
).
So the output for this example is 7
.
Winning Criterion
This is code-golf, so shortest answer in bytes wins!