The first thing is that when you put something in square brackets [] outside of quotation marks, Inform 7 treats it as a comment–something put in your code to help you understand it, but that isn’t actually part of the code. So it ignores it. Which means that Inform thinks you just wrote “let student2 be a random visible student other than.”
The other thing is that “other than” isn’t a built-in phrase in Inform. If we were just testing whether student1 was student2, we could write “if student 2 is not student1,” but choosing a random thing is tricky–there our description of the random object has to be built out of adjectives and relations. As far as I know, and I could be wrong, there isn’t a built-in relation that will let us do what we want here… but we can define one, like this:
Difference relates a thing (called X) to a thing (called Y) when X is not Y. The verb to be different from means the difference relation.
With that in place you should be able to write:
Every turn when 2 students are visible:
let student1 be a random visible student;
let student2 be a random visible student that is different from student1;
say "[student1] and [student2]."
And no problem asking questions! Speaking for myself, it’s fun answering them and I’m glad if I can help someone.