There is another situation where you can determine if the word has two of the same letter. If you guess the letter in a different spot and it is correct, it will also turn green. Example..
Let's assume the puzzle answer is CHEEK
First guess is FRESH - "E" in the third position turns green and the "H" turns yellow
The second guess is LOVER - "E" in the fourth position turns green.
You now know the word has two "E's" in the 3rd and 4th positions and an "H" in position 1 or 2.