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.

Putting it all together with pizza

Putting it all together with pizza - Python Tutorial

From the course: Python for Students (2019)

Putting it all together with pizza

- [Instructor] For this lesson, we're going to use Turtle, Python's built-in drawing feature, to draw this pizza. The way that we draw this pizza is by drawing a combination of circles and lines to represent the pizza on the screen. Specifically, we're going to draw a crust-colored circle and then a yellow circle with a red outline, and then lots of different red circles to represent the pepperoni, and then we'll draw eight lines in and out to simulate the cuts on the pizza. Let's get started. The first thing we always do when using Turtle is import it at the top of our program. The next thing we're going to do is declare some constants which are going to represent the colors that we want to use throughout this program. Constants are just variables that we don't expect to change. Python programmers generally use all uppercase to represent constants. The reason I want to use constants is they're more descriptive, which will allow other people reading this code to…

Contents