Python version on the HP Prime
|
02-14-2022, 07:07 PM
Post: #4
|
|||
|
|||
RE: Python version on the HP Prime
The prime has a few issues with the sun_moon.py code:
a. fsum and isclose do not exit in the math module. b. exit is in the sys module To fix this i put the following code at the top of the file: Code: from builtins import sum as fsum Then I went thru the code and replace math.fsum with fsum and math.isclose with isclose. With these changes it runs on the prime and seems to give results similar to the original file when run in spider. You may want to change the print statements to fit better on the prime's screen. The file is attached below with the extension changed to .txt. -road sun_moon_prime.txt (Size: 47.64 KB / Downloads: 23) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Python version on the HP Prime - kuenze - 02-13-2022, 10:12 AM
RE: Python version on the HP Prime - Thomas_Sch - 02-13-2022, 04:10 PM
RE: Python version on the HP Prime - kuenze - 02-13-2022, 08:57 PM
RE: Python version on the HP Prime - roadrunner - 02-14-2022 07:07 PM
RE: Python version on the HP Prime - Guenter Schink - 02-14-2022, 08:47 PM
RE: Python version on the HP Prime - kuenze - 02-15-2022, 06:48 AM
RE: Python version on the HP Prime - Guenter Schink - 02-16-2022, 09:17 PM
RE: Python version on the HP Prime - kuenze - 02-18-2022, 09:38 AM
|
User(s) browsing this thread: 1 Guest(s)