I don't know this is don't working

I don't know this is don't working
0

Why this is don’t working?

first = green
second = red

response = input("What is the color? ")

if (response) == first:
    print("It's green")
 
if (response) == second:
	print("It's red")

What is the value of green? What is the value of red?

Sorry, that wasn’t the best example.
Here is the one:

turtle_name = input("What is the name? ")
turtle_name = turtle.Turtle()

first_turtle = input("What is the name? ")
first_turtle = turtle.Turtle()

second_response = input("Wich one of them to move? ")

if (second_response) == turtle_name:
    response = input("Choose move forward, move backard, turn right or turn left. ")
    
if (second_response) == first_turtle:
   response = input("Choose move forward, move backard, turn right, turn left or none. ")

What does the Turtle method look like?

It’s basically a program to draw.

What are you expecting the code above to do that it does not do?

1 Like

I don’t understand your question.

What is “not working” in your code above?

When i answer to the second response the name of one of them, the if statements don’t run.

The above line assigns the value the user enters to turtle_name.

The above line reassigns some new value (I have not idea what because I don’t know what the Turtle method looks like) to turtle_name? Why bother with the first line if you are just going to change turtle_name again with the second line. You can delete the first line and get the same result.

turtle.Turtle means “The turtle type that is defined within the turtle module”.

That does not change the fact that you are overwriting the value of turtle_name with the second line. You are doing the same thing with lines 3 and 4. Why are you doing this?

I am trying to do a program to use two turtles to draw.

I meant why are you overwriting the value of turtle_name on line 2 and overwriting the value of first_turtle on line 4?

well the answer to the fixing of the program is there