What is wrong with this python code?
import turtle
turtle.pencolor("red")
turtle.bgcolor("black")
turtle.forward(100)
turtle.right(90)
turtle.forward (100)
turtle.right(90)
turtle.forward(100)
turtle.forward(90)
1 answer
There is nothing technically wrong with the code, as it will execute without errors. However, the last line (`turtle.forward(90)`) may have been intended to turn the turtle to the left 90 degrees. Without the turn, the turtle will continue moving in the same direction as the previous forward command.