In this Python tutorial, we will learn How to Make a Dog Fae Using Python Turtle. In this tutorial, we split the code and explain How we can Make a Dog Face by using Python Turtle.
How to Make a Dog Face Using Python Turtle
Now start this project, firstly importing the turtle library such as import turtle as tur.
# How to Make a Dog Face Using Python Turtle
#Imported turtle
import turtle as tur
Github Link
Check this code in Repository from Github and you can also fork this code.
Github User Name: PythonT-Point
After importing the turtle library we are creating an object for this turtle and also give a title to the screen.
#set the turtle object
turt=tur.Turtle()
tur.title("Pythontpoint")
screen=turt.getscreen()
screen.bgcolor("light yellow")
After that, we are using the function to create the face of the dog. For creating the face, we have to use the following functions.
- turt.pencolor(“tan1”) is used as pen color.
- turt.pensize(3) is used to give the size of the pen.
- turt.goto(30,-30) is used to move the turtle at its accurate position.
- turt.pendown() is used to start drawing on the screen with the help of the turtle.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.circle(45,180) is used to draw the circle on the screen.
- turt.right(90) is used to move the turtle in the right direction.
- turt.forward(55) is used to move the turtle in the forward direction.
- turt.penup() is used to stop the drawing.
- turt.end_fill() is used to stop filling the color in the shape.
# How to Make a Dog Face Using Python Turtle
#Drawing the face of the dog
turt.pencolor("tan1")
turt.color("tan1")
turt.pensize(3)
turt.penup()
turt.setheading(90)
turt.goto(30,-30)
turt.pendown()
turt.begin_fill()
turt.circle(45,180)
turt.right(90)
turt.goto(-45,-30)
turt.circle(35,190)
turt.setheading(0)
turt.forward(55)
turt.penup()
turt.setheading(0)
turt.pendown()
turt.circle(35,170)
turt.penup()
turt.end_fill()
After that, we are using the function to create the tongue of the dog. For creating the tongue we are using the following function.
- turt.pencolor(“Deeppink1”) is used to give the color to the pen.
- turt.goto(-10,-90) is used to move the turtle at its accurate position.
- turt.right(60) is used to move the turtle in the right direction.
- turt.pendown() is used to start the drawing on the screen.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.forward(15) is used to move the turtle in the forward direction.
- turt.left(60) is used to move the turtle in the left direction.
- turt.end_fill() is used to stop filling color.
#Create the tongue of the dog
turt.pencolor("Deeppink1")
turt.color("pink")
turt.setheading(270)
turt.goto(-10,-90)
turt.right(60)
turt.pendown()
turt.begin_fill()
turt.forward(15)
turt.left(60)
turt.forward(10)
turt.circle(10,180)
turt.forward(10)
turt.left(60)
turt.forward(15)
turt.end_fill()
Now we are using the function to make the line on the tongue. For drawing the line on the tongue we are using the following function.
- turt.pensize(1) is used to give the size of the pen.
- turt.pencolor(“DeepPink”) is used to give the color to the pen.
- turt.goto(-13,-90) is used to move the turtle at its accurate position.
- turt.forward(17) is used to move the turtle in the forward direction.
- turt.circle(4,180) is used to make the circle by using a turtle.
- turt.left(90) is used to move the turtle in the left direction.
- turt.pendown() is used to start the drawing on the screen.
#line on the tongue
turt.pensize(1)
turt.pencolor("DeepPink")
turt.goto(-13,-90)
turt.setheading(270)
turt.forward(17)
turt.circle(4,180)
turt.penup()
turt.left(90)
turt.forward(8)
turt.goto(-13,-107)
turt.setheading(270)
turt.left(180)
turt.pendown()
turt.circle(4,-180)
Now we’re using the function to create the right and left ears of the dog. For drawing the ears we are using the following function.
- turt.penup() is used to stop the drawing.
- turt.pencolor(“black”) is used to give the color to the pen.
- turt.pendown() is used to start the drawing on the screen.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.forward(10) is used to move the turtle in the forward direction.
- turt.left(60) is used to move the turtle in the left direction.
- turt.circle(35,145) is used to draw the circle.
- turt.end_fill() is used to stop filling color in the shape.
#right ear
turt.penup()
turt.goto(42,-45)
turt.pencolor("black")
turt.color("sienna")
turt.setheading(0)
turt.pendown()
turt.begin_fill()
turt.forward(10)
turt.left(60)
turt.circle(35,145)
turt.end_fill()
#left ear
turt.penup()
turt.goto(-70,-45)
turt.pendown()
turt.setheading(180)
turt.begin_fill()
turt.forward(10)
turt.left(-240)
turt.circle(35,-145)
turt.end_fill()
turt.penup()
After that, we are using the function to make the eyes of the dog. For drawing the eyes we are using the following function.
- turt.color(“black”) is used to give color to the shape.
- turt.pendown() is used to start the drawing on the screen.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.circle(10,180) is used to draw the shep of the circle.
- turt.forward(5) is used to move the turtle in the forward direction.
- turt.end_fill() is used to stop filling color in the shape.
- turt.penup() is used to stop the drawing.
# How to Make a Dog Face Using Python Turtle
#eyes
turt.pencolor("black")
turt.color("black")
turt.goto(-5,-45)
turt.setheading(270)
turt.pendown()
turt.begin_fill()
turt.circle(10,180)
turt.forward(5)
turt.circle(10,180)
turt.forward(5)
turt.end_fill()
turt.penup()
turt.pencolor("black")
turt.color("black")
turt.goto(-45,-45)
turt.setheading(270)
turt.pendown()
turt.begin_fill()
turt.circle(10,180)
turt.forward(5)
turt.circle(10,180)
turt.forward(5)
turt.end_fill()
turt.penup()
Now, we are using the function to make the inner white dots in the eyes of the dog. For drawing the inner white dots in the eyes we are using the following function.
- turt.color(“white”) is used to give the white color to the dots.
- turt.goto(-2,-44) is used to move the turtle to its accurate position.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.circle(6) is used to draw the shape of the circle.
# Inner white dots in the eye
turt.color("white")
turt.goto(-2,-44)
turt.begin_fill()
turt.circle(6)
turt.end_fill()
turt.color("white")
turt.goto(-40,-44)
turt.begin_fill()
turt.circle(6)
turt.end_fill()
Now, we are using the function to make the nose of the dog. For drawing the nose we are using the following function.
- turt.color(“black”) is used to give the black color to the nose.
- turt.goto(-25,-75) is used to move the turtle at its accurate position.
- turt.begin_fill() is used to start filling the color in the shape.
- turt.circle(2) is used to draw the shape of the circle.
- turt.hideturtle() is used to hide the turtle on the screen.
# How to Make a Dog Face Using Python Turtle
#Nose of the dog
turt.color("black")
turt.goto(-25,-75)
turt.begin_fill()
turt.circle(10)
turt.end_fill()
turt.goto(-14,-73)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.goto(-20,-73)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.goto(-17,-77)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.hideturtle()
tur.done()
After splitting the code and explaining How to Make a Dog Face Using Python Turtle. Now we will see how the output looks like after running the whole code.
# How to Make a Dog Face Using Python Turtle
# How to Make a Dog Face Using Python Turtle
#Imported turtle
import turtle as tur
#set the turtle object
turt=tur.Turtle()
tur.title("Pythontpoint")
screen=turt.getscreen()
screen.bgcolor("light yellow")
#Drawing the face of the dog
turt.pencolor("tan1")
turt.color("tan1")
turt.pensize(3)
turt.penup()
turt.setheading(90)
turt.goto(30,-30)
turt.pendown()
turt.begin_fill()
turt.circle(45,180)
turt.right(90)
turt.goto(-45,-30)
turt.circle(35,190)
turt.setheading(0)
turt.forward(55)
turt.penup()
turt.setheading(0)
turt.pendown()
turt.circle(35,170)
turt.penup()
turt.end_fill()
#Create the tongue of the dog
turt.pencolor("Deeppink1")
turt.color("pink")
turt.setheading(270)
turt.goto(-10,-90)
turt.right(60)
turt.pendown()
turt.begin_fill()
turt.forward(15)
turt.left(60)
turt.forward(10)
turt.circle(10,180)
turt.forward(10)
turt.left(60)
turt.forward(15)
turt.end_fill()
#line on the tongue
turt.pensize(1)
turt.pencolor("DeepPink")
turt.goto(-13,-90)
turt.setheading(270)
turt.forward(17)
turt.circle(4,180)
turt.penup()
turt.left(90)
turt.forward(8)
turt.goto(-13,-107)
turt.setheading(270)
turt.left(180)
turt.pendown()
turt.circle(4,-180)
#right ear
turt.penup()
turt.goto(42,-45)
turt.pencolor("black")
turt.color("sienna")
turt.setheading(0)
turt.pendown()
turt.begin_fill()
turt.forward(10)
turt.left(60)
turt.circle(35,145)
turt.end_fill()
#left ear
turt.penup()
turt.goto(-70,-45)
turt.pendown()
turt.setheading(180)
turt.begin_fill()
turt.forward(10)
turt.left(-240)
turt.circle(35,-145)
turt.end_fill()
turt.penup()
#eyes
turt.pencolor("black")
turt.color("black")
turt.goto(-5,-45)
turt.setheading(270)
turt.pendown()
turt.begin_fill()
turt.circle(10,180)
turt.forward(5)
turt.circle(10,180)
turt.forward(5)
turt.end_fill()
turt.penup()
turt.pencolor("black")
turt.color("black")
turt.goto(-45,-45)
turt.setheading(270)
turt.pendown()
turt.begin_fill()
turt.circle(10,180)
turt.forward(5)
turt.circle(10,180)
turt.forward(5)
turt.end_fill()
turt.penup()
# Inner white dots in the eye
turt.color("white")
turt.goto(-2,-44)
turt.begin_fill()
turt.circle(6)
turt.end_fill()
turt.color("white")
turt.goto(-40,-44)
turt.begin_fill()
turt.circle(6)
turt.end_fill()
#Nose of the dog
turt.color("black")
turt.goto(-25,-75)
turt.begin_fill()
turt.circle(10)
turt.end_fill()
turt.goto(-14,-73)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.goto(-20,-73)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.goto(-17,-77)
turt.color("white")
turt.begin_fill()
turt.circle(2)
turt.end_fill()
turt.hideturtle()
tur.done()
After running the above code we get the following output in which we can see that the face of the dog is beautifully drawn on the screen.
So, in this tutorial, we have illustrated How to Make a Dog Face Using Python Turtle. Moreover, we have also discussed the whole code used in this tutorial.
Read some more tutorials related to Python Turtle.
It is appropriate time to make a few plans for the longer term and it’s time to be happy. I have read this post and if I may I want to recommend you few fascinating issues or advice. Maybe you can write subsequent articles regarding this article. I want to learn even more things about it!
Some truly nice and useful information on this website, too I think the pattern contains fantastic features.
I precisely needed to say thanks yet again. I do not know what I might have gone through in the absence of these pointers revealed by you relating to that subject. It was actually a very troublesome situation in my view, but taking note of your expert technique you processed that took me to cry over contentment. I’m happier for your guidance as well as wish you comprehend what a powerful job you are providing instructing people today using a blog. I know that you’ve never got to know any of us.
Temp Mail You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
You actually make it seem so easy together with your presentation however I in finding this topic to be actually something which I believe I might never understand. It sort of feels too complicated and extremely wide for me. I am having a look forward on your subsequent publish, I?¦ll attempt to get the cling of it!
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
A person essentially help to make seriously posts I would state. This is the first time I frequented your web page and thus far? I surprised with the research you made to create this particular publish extraordinary. Magnificent job!
Nice read, I just passed this onto a friend who was doing some research on that. And he just bought me lunch as I found it for him smile Thus let me rephrase that: Thank you for lunch! “He who walks in another’s tracks leaves no footprints.” by Joan Brannon.
Your article helped me a lot, is there any more related content? Thanks!
My brother recommended I might like this web site He was totally right This post actually made my day You cannt imagine just how much time I had spent for this information Thanks
I’ve recently started a website, the info you offer on this web site has helped me tremendously. Thanks for all of your time & work.
You should participate in a contest for among the finest blogs on the web. I will recommend this site!
There are certainly numerous particulars like that to take into consideration. That is a nice level to carry up. I offer the thoughts above as common inspiration however clearly there are questions just like the one you convey up where an important factor shall be working in honest good faith. I don?t know if greatest practices have emerged round things like that, but I am positive that your job is clearly identified as a fair game. Each boys and girls feel the affect of just a moment’s pleasure, for the rest of their lives.
I appreciate, cause I found just what I was looking for. You’ve ended my four day long hunt! God Bless you man. Have a great day. Bye
Real Estate This is really interesting, You’re a very skilled blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your site in my social networks!
BaddieHub Nice post. I learn something totally new and challenging on websites
There are certainly plenty of particulars like that to take into consideration. That is a great level to convey up. I supply the thoughts above as general inspiration however clearly there are questions like the one you bring up the place crucial thing will probably be working in sincere good faith. I don?t know if finest practices have emerged around issues like that, however I am sure that your job is clearly recognized as a fair game. Each girls and boys really feel the influence of only a moment’s pleasure, for the rest of their lives.
Hi, I’m Jack. Your blog is a treasure trove of valuable insights, and I’ve made it a point to visit daily. Kudos on creating such an amazing resource!
Hi there, just became aware of your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!
allegheny county real estate For the reason that the admin of this site is working, no uncertainty very quickly it will be renowned, due to its quality contents.
Tech to Force Awesome! Its genuinely remarkable post, I have got much clear idea regarding from this post . Tech to Force
Tech to Force I like the efforts you have put in this, regards for all the great content.
Perfect piece of work you have done, this website is really cool with fantastic information.
I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.
What i dont understood is in reality how youre now not really a lot more smartlyfavored than you might be now Youre very intelligent You understand therefore significantly in terms of this topic produced me personally believe it from a lot of numerous angles Its like women and men are not interested except it is one thing to accomplish with Woman gaga Your own stuffs outstanding Always care for it up
I do believe all the ideas youve presented for your post They are really convincing and will certainly work Nonetheless the posts are too short for novices May just you please lengthen them a little from subsequent time Thanks for the post
Hey there You have done a fantastic job I will certainly digg it and personally recommend to my friends Im confident theyll be benefited from this site
ссылка на интересную статью, рекомендую ознакомиться, перейти на сайт, на русском языке yypykgpnai … http://google.se/url?q=https://t.me/s/kazino_casino_top
Some really quality posts on this site, saved to favorites.
Family Dollar I do not even understand how I ended up here, but I assumed this publish used to be great