ruby code to count how many letter occurrences there are in a string.
Example
dna1 = ('ATTGCC')
output: {"A"=>1, "T"=>2, "G"=>1, "C"=>2}
Answer-
Your code is here-
screenshot of output-
Note- Please do upvote, if any problem then comment in
box sure I will help.
Get Answers For Free
Most questions answered within 1 hours.