The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
How do I correctly use the SOLVE() function in Python?
09-17-2023, 07:49 AM
Post: #1
How do I correctly use the SOLVE() function in Python?
I am increasingly committed to using HP Prime's Python as the main programming language at the university. However, I still stumble on simple things, like using the solve() function, which on PC Python I can easily use by importing the sympy library. However, on the HP prime I am limited to the functions and libraries that already come with it, which are many. And what I'm most interested in knowing how to use is the SOLVE() function, however I'm having difficulty introducing the Var argument? because every time I enter it, it informs me that I did not declare the 'x'. How to resolve this? Follow my code.

#python export test3()
import linalg

conta = eval("2*x+8")
x = eval("x")
print(linalg.solve(conta,x))

#end


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
How do I correctly use the SOLVE() function in Python? - GilsonCarvalho - 09-17-2023 07:49 AM



User(s) browsing this thread: 2 Guest(s)