Closed darciew closed 6 years ago
It looks like the strings in word
are lower case. Does it work with upper case?
Hi Darcie, There's no need to iterate over the points hash. you already know the letter, so to get the points value for that letter you can say: points[letter] Also, afaraone is correct. You need to be using upper case letters or converting them to upper case before accessing the hash keys.
thanks both :)
That seemed to do the trick now I am just left with the values printed - do I use sum to add them all up?
you can keep a running total in a variable (increment the total score for each letter) and output the total score at the end
thanks @jonurry!
Not sure how to match the values to the users word and add them all together?
At the moment it is just printing out the word...
Any ideas on where I am going wrong?