Working Mastermind

"Mastermind is a two-player code-breaking game where one player makes a
code (in your program this will be the human player) and another player
guesses the code (in your program this will be the computer player).
Your task is to create a game that allows a human player to play
against the computer. The computer should be able to guess the correct
code (created by the human player) within 10 turns. The code is made up
of four colors and can include duplicates. There are six available
colors from which to choose: red, green, orange, yellow, blue, purple."