PYTHON: un segmento y calcular su longitud
x =100
x2 =150
y =500
y2 =400
def setup():
size(800,600)
strokeWeight(5)
textSize(40)
def draw():
line(x,x2,y,y2)
h=sqrt((x2-x)*(x2-x)+(y2-y)*(y2-y))
text(h,400,300)
x =100
x2 =150
y =500
y2 =400
def setup():
size(800,600)
strokeWeight(5)
textSize(40)
def draw():
line(x,x2,y,y2)
h=sqrt((x2-x)*(x2-x)+(y2-y)*(y2-y))
text(h,400,300)
Comentarios
Publicar un comentario