1 / 5

Python Project — Draw Doraemon

https://pythonflood.com/python-project-draw-doraemon-9c067ccca8c3

ayushii12
Download Presentation

Python Project — Draw Doraemon

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Steps to Create Doraemon: 1. Create a Class: First, we will create a class named Doraemon. In this class, we will define the following functions. 2.Defining the init() functions: In this function, we will set the width and height of the screen. 3.Defining my_goto() functions: Here we are defining the penup(), goto(x,y) and pendown() methods. The penup() method will stop the drawing,but the turtle will move with the given position and the pendown() method will start the drawing. The goto(x,y) method will move the turtle to the given coordinates.

  2. Steps to Create Doraemon: 4.Defining eyes() function: 1. 2. 3. 4. 5. It is created to draw eyes. Here we have created a loop for drawing the eyes. fillcolor() method is used to give the colour to drawing. begin_fill() method will remember the starting point from where colouring will start. end_fill() method will fill the colour. 5.Defining beard function: seth() will give the angle to the drawing. fd() is used to move the turtle forward. 7. 6.Defining mouth function: 1. 6. circle() method will create a circle with a given radius. 7.Defining scarf function. 8.Defining nose function. 9.Defining pupil function: 1. pensize() is the size of the pointer which draws.

  3. Steps to Create Doraemon: 10.Defining face function. 11.Defining head function. 12.Defining start function: 1. It will start drawing according to the given order. 13.Module Source File: 1. 2. 3. 4. 5. Here we write module source code for the program. pensize() given is 5 and speed() is 9. Now we will call the class doraemon. start() will start the program. We will close the program with mainloop().

  4. Conclusion- Now we have successfully learned how to draw our favourite cartoon character Doraemon using Python with its turtle library. Hope you had fun making this project, now you can also draw your favourite cartoon character using this turtle library.

More Related