I'm creating code for the mastermind game and I think that everything should be perfect, but when I try to write the info needed by the first input (in this case, the colors like "R", it doesn't matter what I do that will jump directly to print ("You have to introduce four colours, no more, no less! ")
Can anyone help me please???
Here's the code:
colours=["R", "G", "B", "Y", "W", "R", "P"]
attempts=0
game=True
codemaker=random.sample(colours,4)
print (codemaker)
while game:
white_points=0
black_points=0
guessed_colour=""
player_guess=input().upper()
attempts+=1
if len(player_guess) != len(codemaker):
print ("You have to introduce four colours, no more, no less! ")
continue
input? Are you only inputting a single letter?inputis a string. From your code, your input must be a string of 4 letters, e,g,rgbyfor thelencomparison to work