I have a new idea about an exercise for the go track.
It is an OMR sheet parser. Functions should accept 2d arrays/slices and the student would create the parser.
How can I contribute?
What exactly is being parsed? Are you simply giving the index of a specific character for array? Iterate through arrays, look up the first “x” in the array, append that value?
like, there would be a 2d array inputted to the function like
[[1,O,3],[1,2,3],[1,2,O]] (that’s an O, not a 0)
the function can parse if it’s a valid omr entry (it returns false if O is marked more than once on same column)
and, will produce the whole number that is marked in the omr
in this case, “023”
So … basically check the count and index of an “O” string in an array of strings?
2d array, yes
var out []int
for array := range arrays {
first := slices.Index(array, "O")
// error if more than one O
out = append(out, first + 1)
}
return out
Something like that? Would this be intending to teach some specific concept?
nvm. you can close or delete the topic