top of page
Search

Draw a heart ❤️ with Python Turtle

Are you looking for a sweet but easy programming hack to impress your loved one? DeTech Theory’s got you covered - follow these steps to draw a beautiful, red ❤️ in minutes!

Source code:


import turtle
t = turtle.Turtle()
t.fillcolor('red')
t.begin_fill()
t.left(140)
t.forward(113)
for i in range(200):
  t.right(1)
  t.forward(1)
t.left(120)
for i in range(200):
  t.right(1)
  t.forward(1)
t.forward(112)
t.end_fill()

Be sure to like this post and subscribe to our blog (for free) to keep up more coding tips!


 
 
 

Recent Posts

See All
Java Switch Case

Ever needed to write a million if-else statements to the point where your brain is breaking and you're about an inch away from throwing...

 
 
 

Comments


bottom of page