Created
February 14, 2021 07:21
-
-
Save gatukgl/ac1f89b13e116df8a91565639a3257b2 to your computer and use it in GitHub Desktop.
Drawing heart with turtle in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import turtle | |
turtle.pensize(3) | |
def draw_heart_curve(): | |
for i in range(200): | |
turtle.right(1) | |
turtle.forward(1) | |
turtle.color("pink", "pink") | |
turtle.begin_fill() | |
turtle.left(140) | |
turtle.forward(111.65) | |
draw_heart_curve() | |
turtle.left(120) | |
draw_heart_curve() | |
turtle.forward(111.65) | |
turtle.end_fill() | |
turtle.color('deep pink') | |
style = ('Comic Sans MS', 30, 'italic') | |
turtle.write('Happy Valentine\'s Day', font=style, align='center') | |
turtle.hideturtle() | |
turtle.done() |
after i'll write this code what should id do? i use cs50.dev website
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks