ajout de tous les cours et TP préparés cet été

This commit is contained in:
2026-01-17 23:10:49 +01:00
parent ed9415bc81
commit 301cf5a98f
125 changed files with 21614 additions and 542 deletions

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)