loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
import turtle

tartaruga = turtle.Turtle()
miVentana = turtle.Screen()

def debuxarEspiral(tartaruga, lonxitudeLinea):
    if lonxitudeLinea > 0:
        tartaruga.forward(lonxitudeLinea)
        tartaruga.right(90)
        debuxarEspiral(tartaruga,lonxitudeLinea-5)

debuxarEspiral(tartaruga,100)
miVentana.exitonclick()
result
console