← Back to Strings
Question 31
Count Characters By Hand
Count Characters By Hand
Read one word and count its characters without calling len(): start a counter at zero, add one to it for every character the for loop visits, then print the total in the form Characters: <n>. Input: one line, the word, no prompt. The output is that single line.
Expected Output:
Characters: 6= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.