[Tutor] Drawing simple graphics objects
Steven D'Aprano
steve at pearwood.info
Mon Apr 4 11:51:03 EDT 2016
On Sun, Apr 03, 2016 at 11:17:55PM -0400, Ashley Jacobs wrote:
> Hi,
> could you help me with python 3.5 coding for graphics?
You can start with the turtle graphics:
https://docs.python.org/3/library/turtle.html
Here is a simple example. Copy and paste this code into Python and run
it, and you will see the turtle draw some lines and circles:
import turtle
turtle.color("blue")
turtle.forward(20)
turtle.left(30)
turtle.forward(20)
turtle.penup()
turtle.forward(20)
turtle.pendown()
turtle.forward(80)
turtle.color("red")
turtle.circle(35)
turtle.color("black")
turtle.circle(-20)
--
Steve
More information about the Tutor
mailing list