yes, they are defined in the function signature as parameters you expect. However, they are not used in the body of the said function (or at least what you have show us):
correct = 0 attempts = 0 while correct < 4: answer1 = False while answer1 == False: if guess1 == c1: # if answer is correct print("Colour in position 1 correct") # print this message correct = correct + 1 # adds 1 to correct total attempts = attempts + 1 # adds 1 to attempts total answer1 = True # closes while loop elif guess1 == c2 or guess1 == c3 or guess1 == c4: # if answer is correct but in wrong place print("Colour correct but in wrong place position 1") # prints this message attempts = attempts + 1 # adds 1 to attempts total guess1 = input("Please enter your choice for the 1st colour: ") # asks user for another guess else: # if answer is wrong print("Wrong colour chosen") # print this message attempts = attempts + 1 # adds 1 to attempts total guess1 = input("Please enter your choice for the 1st colour: ") # asks user for another guess answer2 = False # code repeats this process for the other 3 answers while answer2 == False: if guess2 == c2: print("Colour in position 2 correct") correct = correct + 1 attempts = attempts + 1 answer2 = True elif guess2 == c1 or guess1 == c3 or guess1 == c4: print("Colour correct but in wrong place position 2") attempts = attempts + 1 guess2 = input("Please enter your choice for the 2nd colour: ") else: print("Wrong colour chosen") attempts = attempts + 1 guess2 = input("Please enter your choice for the 2nd colour: ") answer3 = False while answer3 == False: if guess3 == c3: print("Colour in position 3 correct") correct = correct + 1 attempts = attempts + 1 answer3 = True elif guess3 == c1 or guess1 == c2 or guess1 == c4: print("Colour correct but in wrong place position 3") attempts = attempts + 1 guess3 = input("Please enter your choice for the 3rd colour: ") else: print("Wrong colour chosen") attempts = attempts + 1 guess3 = input("Please enter your choice for the 3rd colour: ") answer4 = False while answer4 == False: if guess4 == c4: print("Colour in position 2 correct") correct = correct + 1 attempts = attempts + 1 answer4 = True elif guess4 == c1 or guess1 == c2 or guess1 == c3: print("Colour correct but in wrong place position 4") attempts = attempts + 1 guess2 = input("Please enter your choice for the 4th colour: ") else: print("Wrong colour chosen") attempts = attempts + 1 guess4 = input("Please enter your choice for the 4th colour: ") print("Well done! You got all the colours right") # prints this message when all colours are correct print("The number of guesses taken was: ", attempts) # tells them how many guesses they took data2 = (correct,attempts) # stores these variables as data2 return data2 # returns data2 for use in other subprogramsso, you take 2 arguments and just discard them.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs