Mars Exploration

  • + 0 comments
    def marsExploration(s):
        # Write your code here
        testStr = "SOS"
        lengthOfTestStr = len(testStr)
        index = 0
        result = 0
        for char in s:
            if char != testStr[index % lengthOfTestStr]:
                result += 1
            index += 1
        return result