I am trying to define a function that draws a triangle of a given size using the turn method. I've never used turtle graphics before and am not sure how to go about this.
Thank you
jozz3
0
Light Poster
Recommended Answers
Jump to PostCheck this my code in the end of one thread about circles. Play with the code
Jump to PostIn simple terms, to form the triangle you can draw 3 lines of the same length. To connect the lines, you turn the turtle by 360/3 = 120 degrees after each line has been drawn.
Example ...
import turtle as tu tu.forward(200) tu.right(120) tu.forward(200) tu.right(120) tu.forward(200) …
All 6 Replies
TrustyTony
888
pyMod
Team Colleague
Featured Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
jozz3
0
Light Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.