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

 

countLetter


Count how many times the letter is in the string. Assume letter is a string of length 1. Do NOT use the built in string method count.


countLetter('fishiii', 'i') → 4
countLetter('fishiii', 'f') → 1
countLetter('fishiii', 'I') → 0

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

def countLetter(string,letter):

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

Python Help

Copyright Nick Parlante 2017 - privacy