Answers for "turtle.goto"

0

how to use goto in python turtle

#Draw a set of nested squares, increasing in size
from turtle import *

number_of_shapes = 4

for shape in range(1, number_of_shapes + 1):
    #Draw a square
    for sides in range(1,5):
        forward(20 + shape * 10)
        right(90)

#Move to position of next square
    penup()
    goto(shape * 10, shape * 10)
    pendown()
Posted by: Guest on January-20-2021
0

setheading in python

turtle.setheading(direction) #set the direction for turtle
Posted by: Guest on October-24-2020

Python Answers by Framework

Browse Popular Code Answers by Language