0

This is easily the dumbest question I have ever had to ask, but I'm trying to use Turtle to code something that will take English inputs and draw letters in an alphabet I created for a D&D campaign. I'm trying to draw a letter like this:

Letter I'm trying to draw. Similar to a candy cane?

The code I have currently is this:

turtle.pendown()
turtle.seth(270)
turtle.forward(50)
turtle.back(50)
turtle.seth(90)
turtle.circle(25,150)

But the problem is that the result draws what I want backwards. I tried changing the heading to everything I can think of, but nothing makes the shape I want. What am I missing?

3 Answers3

0

To arc in a clockwise direction, you can set the radius to be negative

...

turtle.circle(-25,150)

James K
  • 3,692
  • 1
  • 28
  • 36
0

turtle.circle(radius, extent) draws in a counterclockwise direction for positive values of radius.

use negative numbers to draw clockwise.

see the turtle documentation for more https://docs.python.org/3/library/turtle.html#turtle.circle

Joe A
  • 119
  • 4
0

Since you were already heading down, you could stay in that orientation and draw the arc backward (negative extent):

turtle.pendown()
turtle.seth(270)
turtle.forward(50)
turtle.back(50)
# turtle.seth(90)        <-- don't change direction
turtle.circle(25,-150) # <-- draw arc backward
Alain T.
  • 40,517
  • 4
  • 31
  • 51