filmov
tv
Python Program To Draw Smile Face Emoji(In 2 minutes) #pythonprogramming
Показать описание
This video shows How to draw an emoji(smiley face) with Python programming. The video will give you the basics which you can later improve on to draw more complex emoji. The module used is turtle.
Following steps were used :
Import turtle.
Make objects.
Draw a circle and fill yellow color.
Draw eyes with two circles and fill white and black color respectively.
Draw circle for nose and fill black color.
Draw semi circle for mouth.
Draw semi circle for tongue and fill red color.
Here is the code:
Python program to draw smile
# face emoji using turtle
import turtle
# turtle object
pen = turtle.Turtle()
# function for creation of eye
def eye(col, rad):
# draw face
# draw eyes
eye('white', 15)
eye('black', 5)
eye('white', 15)
eye('black', 5)
# draw nose
eye('black', 8)
# draw mouth
# draw tongue
Following steps were used :
Import turtle.
Make objects.
Draw a circle and fill yellow color.
Draw eyes with two circles and fill white and black color respectively.
Draw circle for nose and fill black color.
Draw semi circle for mouth.
Draw semi circle for tongue and fill red color.
Here is the code:
Python program to draw smile
# face emoji using turtle
import turtle
# turtle object
pen = turtle.Turtle()
# function for creation of eye
def eye(col, rad):
# draw face
# draw eyes
eye('white', 15)
eye('black', 5)
eye('white', 15)
eye('black', 5)
# draw nose
eye('black', 8)
# draw mouth
# draw tongue