Tracer une fonction avec Turtle
from turtle import * from math import * def droite_graduee(): x=-160 goto(x,0) pendown() while x<160: setheading(0) forward(10) left(90) forward(3) backward(3) x+=10 penup() y=-110 goto(0,y) pendown() while y<110: setheading(90) forward(10) right(90) forward(3) backward(3) y+=10 def f(x): return 5*sqrt(x)-3 def graphique(): droite_graduee() penup() for x in range(0,150,10): goto(x,f(x)) pendown()