If there was a second of the same letter, but in the wrong place, it would be yellow. If it's gray, that means there is no repetition of that letter. So once you've seen that the second one is gray, you have the information you need to know that letter is not repeated.
Grepping /usr/share/dict/words shows 110 words that have five letters and the same letter 3 or more times, e.g. sassy, added, daddy, nanny, melee, levee, mummy
It also accepted GEESE
Mamma has 3 M's.
How many times do distinct letters appear in the word mamma? Do not write code to produce an answer.
There obviously are, e.g., mamma.
What was the point in asking this (irrelevant) question?
I read a bit too quickly over "It's only once you know that A does not appear twice", thinking it disregarded the case where A appears three or more times, but if read well that was addressed in the remainder of the sentence.