Letter Value Sum Coding Challenge
February 27, 2023
This site utilizes Google Analytics, Google AdSense, as well as participates in affiliate partnerships with various companies including Amazon. Please view the privacy policy for more details.
An easy coding challenge just to practice recording and uploading.
Challenge from /r/dailyprogrammer/: [2021-07-19] Challenge #399 [Easy] Letter value sum:
“Assign every lowercase letter a value, from 1 for a to 26 for z. Given a string of lowercase letters, find the sum of the values of the letters in the string.”
I didn’t need to do the string.isEmpty() ? 0 :
part at the end; the sum of an empty list of integers is 0.
Music from #Uppbeat (free for Creators!):
https://uppbeat.io/t/adi-goldstein/star-travelers
License code: FRQFAUYBPTLMIJD7
Leave a Reply
Thank you. Your comment will be visible after approval.
Your comment has been submitted, but their seems to be an error. Check your browser console for more details.