โ Back to Loops
Question 117
Loop: Count a Character
Loop: Count a Character
Loop over the string"banana"and count how many times the letter"a"appears, then print the count. Expected output: 3
Expected Output:
3
Topics:
Loops
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.