Mars Exploration

  • + 0 comments
    def marsExploration(s):
        # Write your code here
        count=0
        for i in range(1,len(s)-1,3):
            if s[i-1]!='S':
                count+=1
            if s[i]!='O':
                count+=1
            if s[i+1]!='S':
                count+=1
        return count