import random

MIN_COLOR = 1
MAX_COLOR = 3
MAX_GUESSES = 10
RED = 1
BLUE = 2
GREEN = 3

def processGuessingColor():
    stillGuessingColor= True
    guessedColor = False
    numericColor = -1
    actualColor = ""
    playColor = ""
    i = 1
    numericColor = random.randrange(MIN_COLOR,MAX_COLOR)+1
    while (stillGuessingColor == True):
        if (numericColor == RED):
            actualColor = "red"
        if (numericColor == BLUE):
            actualColor = "blue"
        if (numericColor == GREEN):
            actualColor = "green"
        playerColor = input("Guess color (red, blue, green)")
        if (playerColor == actualColor):
            print("Guessed actual the color %s" %(actualColor))
            stillGuessingColor = False
            guessedColor = True
        i = i + 1
        if (i >  MAX_GUESSES):
            stillGuessingColor = False
            print("Exceeded maximum tries of %d" %(MAX_GUESSES))
    return(guessedColor)

print(processGuessingColor())
