Back Clear
# Your Problem: # Given a string and a non-empty substring sub, compute recursively if at # least n copies of sub appear in the string somewhere, possibly with # overlapping. N will be non-negative. # # # strCopies("catcowcat", "cat", 2) → true # strCopies("catcowcat", "cow", 2) → false # strCopies("catcowcat", "cow", 1) → true # # 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 getStrCopies(str:str, sub:str, n:str) -> bool: # CODE END # Press Ctrl+E (Command+E on mac) to test your code