Back Clear
# Your Problem: # Given a string, compute recursively the number of times lowercase "hi" # appears in the string, however do not count "hi" that have an 'x' # immedately before them. # # # countHi2("ahixhi") → 1 # countHi2("ahibhi") → 2 # countHi2("xhixhi") → 0 # # Credit for this problem goes to Nick Parlante from CodingBat.com # Do not modify anything outside of the function or the function itself. # CODE START def getCountHi2(str:str) -> int: # CODE END # Press Ctrl+E (Command+E on mac) to test your code