← Back to Loops
Question 397
Tally The Chosen Letter
Tally The Chosen Letter
Read a word and then a single letter, and count how many times that letter appears in the word using for ch in word and a comparison (no string methods), then print Found: <count>. Input: two lines, the word then the letter, no prompts.
Expected Output:
Found: 3= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Loops
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.