Home  >  Article  >  Backend Development  >  How to draw a circle using python

How to draw a circle using python

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-06-24 16:55:4929339browse

How to draw a circle using python

How to draw a circle in python? Here are the specific painting steps:

The first step is to click on the menu bar and enter idle.

How to draw a circle using python

The second step is to open the shell, create a new file and name it.

How to draw a circle using python

Related recommendations: "Python Video Tutorial"

The third step is to import the turtle module and start writing code.

The code is as follows:

import turtle

turtle.color('red') #Set the color of the brush

turtle.pensize(3 ) #Set the size of the brush

turtle.circle(100) #Set the size of the circle

turtle.done()

The fourth step is to show the rendering.

How to draw a circle using python

The above is the detailed content of How to draw a circle using python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn