pythonturtle-graphicspython-turtle

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

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