Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I make a waterdrop shape using turtle in python?

Here is my code:

import turtle

t = turtle.Turtle()
t.width(5)

t.right(112.5)
t.forward(100)
t.circle(50, 225)
t.forward(100)
t.hideturtle()

It almost makes the correct shape, but the two points at the top don’t meet each other.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Maybe the radius of the circle is wrong, or there are some other mistakes. Please fix my code

>Solution :

You needed to add more angle from the start and adjust the circle to get it right.

import turtle


t = turtle.Turtle()
t.width(5)


t.right(120)        
t.forward(100)      
t.circle(60, 240)   
t.forward(100)      
t.hideturtle()      

turtle.done()

water drop

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading