Retrait de la publication des corrigés python du chapitre

This commit is contained in:
2026-09-21 10:19:25 +02:00
parent 758d4bbf7d
commit 2f072b1711
3 changed files with 0 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
import turtle
def courbe_koch(n, l):
if n == 0 :
turtle.forward(l)
else :
courbe_koch(n-1, l/3)
turtle.left(60)
courbe_koch(n-1, l/3)
turtle.left(-120)
courbe_koch(n-1, l/3)
turtle.left(60)
courbe_koch(n-1, l/3)
def flocon(n,l,i=3):
if i != 0:
courbe_koch(n,l)
turtle.left(-120)
flocon(n,l,i-1)
turtle.setheading(0) # orientation intiale de la tête : vers la droite de l'écran
#turtle.hideturtle() # on cache la tortue
turtle.speed(0) # on accélère la tortue
turtle.color('green')
#flocon(1,300)
#courbe_koch(,400)
print(8)