Question
What is the output of the following code?import turtlet=turtle.Pen()t.right(90)t.forward(100)t.heading()
Answer: Option C
Was this answer helpful ?
The output of the code shown above will be 270.0. The function heading() returns the heading of the turtle, a value in degrees, counter-clockwise from the horizontal right. The output shape of this code is a straight line pointing downwards.
Was this answer helpful ?
Submit Solution