Mars Exploration

  • + 0 comments
    def marsExploration(s):
        # Write your code here
        count = 0
        i = 0
        while i < len(s):
            if s[i] != "S":
                count +=1
            if s[i+1] != "O":
                count +=1
            if s[i+2] != "S":
                count +=1
            i += 3
        return count