HP Forums
Experimenting with Python - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Experimenting with Python (/thread-17821.html)



Experimenting with Python - Dougggg - 12-16-2021 03:18 AM

I was playing with python and download a trianglesolver python module into a python app to check compatability with python code and wrote a user interface and it worked except prime does not have isClose function. but I created my own

out of curiosity I wanted to check if that trianglesolver was avaliable to use in a ppl program and if the python app with the module is selected and it is

example:
Code:

#PYTHON name
from math import *
from trianglesolver import solve, degree
a=26
b=27
c=28
a,b,c,A,B,C = solve(a=a, b=b, c=c)
print(A/degree,B/degree,C/degree)
#END

EXPORT TRIPY()
BEGIN
  //STARTAPP("TriangleSolve");
  PYTHON(name);
END;

just a simple example
I tried to start app but every other time it crashed the calculator, so you have to select the right app
sharing incase any one finds helpful