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

 

dsawyer@methacton.org python_strings > howMany
prev  |  next  |  chance

x is a string with a positive length. ch is a string with a length of 1. Complete the method so that it returns the number of times ch can be found in x. This will be case-sensitive.


howMany('BANANA', 'A') → 3
howMany('Total', 't') → 1
howMany('$$$^&$))$$$$', '$') → 8

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

def howMany( x, ch ):

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

Difficulty: 150

Copyright Nick Parlante 2017 - privacy