to hypotenuse :leg1 :leg2
output sqrt (sum :leg1*:leg1 :leg2*:leg2)
end

to query :statement
  output sentence first butfirst :statement ~
                  sentence first :statement butfirst butfirst statement
end

to rttriangle :leg1 :leg2
  forward :leg1 
  right 90 forward :leg2 
  right 180 - arctan :leg1/:leg2 
  forward hypotenuse :leg1 :leg2
end