Home > Backend Development > Python Tutorial > How to program a heart in Python

How to program a heart in Python

coldplay.xixi
Release: 2020-10-30 11:20:32
Original
140728 people have browsed it

How to program a love in Python: first open the code editor; then enter to draw the outline of a love and fill it with red [pensize(1) pencolor('red')fillcolor('pink') speed(5) up () goto(-30, 100)down()].

How to program a heart in Python

How to program love in Python:

from turtle import *
pensize(1)
pencolor('red')
fillcolor('pink')
speed(5)
up()
goto(-30, 100)
down()
begin_fill()
left(90)
circle(120,180)
circle(360,70)
left(38)
circle(360,70)
circle(120,180)
end_fill()
up()
goto(-100,-100)
down()
Copy after login

How to program a heart in Python

Related free learning recommendations: python video tutorial

The above is the detailed content of How to program a heart in Python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template