Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Letter Value Sum Coding Challenge

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



This post first appeared on JoeHx, please read the originial post: here

Share the post

Letter Value Sum Coding Challenge

×

Subscribe to Joehx

Get updates delivered right to your inbox!

Thank you for your subscription

×