def drawTri(a):
b = (a*math.tan(45))
c = (a/math.cos(45))
t.forward(a)
t.left(135)
t.forward(c)
t.left(135)
t.forward(b)
import turtle
def drawTri(a):
hyp = a * 2**0.5
s = turtle.Screen()
t = turtle.Turtle()
t.forward(a)
t.left(135)
t.forward(hyp)
t.left(135)
t.forward(a)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句