id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

string_sumAsciiValues


Given a String "str", convert each letter to a char, sum up all of their ASCII values, and return the sum. For example, for the input of "Hi", you should add 72 ("H") plus 105 ("i") and should return 177.


string_sumAsciiValues("Hi") → 177
string_sumAsciiValues("Hello") → 500
string_sumAsciiValues("Good Morning") → 1155

...Save, Compile, Run (ctrl-enter)

public int string_sumAsciiValues(String str) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy