Python and Turtle Difficulty Level 2,loop One to Ten (Source Code)

One to Ten (Source Code)

Draw from a single point to ten points that fall into a single line. Also draw dots on the end points.

One to Ten

Source Code:

import turtle

turtle.setup(1000,1000)
turtle.title('One to Ten - PythonTurtle.Academy')
turtle.speed(0)
turtle.hideturtle()

turtle.color('green')

turtle.up()
turtle.goto(0,250)
turtle.dot('red')
for x in range(-450,460,100):
    turtle.up()
    turtle.goto(0,250)
    turtle.down()
    turtle.goto(x,-250)
    turtle.dot('blue')
Tags:

Related Post