From the course: Python for Students (2019)

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Drawing a circle

Drawing a circle

- [Instructor] For this lesson, we're going to learn how to draw circles using Turtle, Python's built-in drawing feature. Whenever we want to use Turtle, the first thing we need to do is import it into our program, and we'll do that on the first line. Then, we're going to create a drawing screen, using the screen function, we'll set the background color of the screen to blue, and we're going to add a title, called Drawing Circles Practice. I've also already created a Turtle, using the Turtle function, and I've set our pen size to five, just to make it a little bit thicker. In order to draw a circle, we're just going to use the circle function, so we can do my turtle.circle and then we pass in the radius size of the circle that we want to create. Let's add turtle.done, to let the program know that we're done, save it, and let's run it. As you can see, it drew a 100 radius circle, starting from the middle of the drawing screen.…

Contents