Mars Exploration

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