HP Prime Python runs consecutive programs
|
09-24-2023, 03:50 PM
(This post was last modified: 09-24-2023 03:51 PM by toml_12953.)
Post: #3
|
|||
|
|||
RE: HP Prime Python runs consecutive programs
(09-23-2023 05:57 PM)Guenter Schink Wrote:(09-22-2023 07:42 PM)Pellidon Wrote: I have two scripts. When the first one is done, the second imports and runs. This does not occur on my Casio, Numworks or either TI calculators with Python. When the second one is done, it does not import back to the first file. Very strange.Unfortunately the Prime doesn't allow for selected imports or runs. One work around is to enclose all programs in "def xx():" you do this on the Numworks too usually, don't you? After an import, NumWorks will automatically run a program that is not included in a function. If you import the program below, Numworks will automatically run the code and print 7. If you remove the # and indent the print statement, then nothing will run automatically when this code is imported. Code: def addit(x,y): Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP Prime Python runs consecutive programs - Pellidon - 09-22-2023, 07:42 PM
RE: HP Prime Python runs consecutive programs - Guenter Schink - 09-23-2023, 05:57 PM
RE: HP Prime Python runs consecutive programs - toml_12953 - 09-24-2023 03:50 PM
RE: HP Prime Python runs consecutive programs - Guenter Schink - 09-24-2023, 07:14 PM
RE: HP Prime Python runs consecutive programs - Pellidon - 09-24-2023, 09:50 PM
RE: HP Prime Python runs consecutive programs - Pellidon - 09-25-2023, 03:00 PM
RE: HP Prime Python runs consecutive programs - Guenter Schink - 09-28-2023, 09:31 PM
RE: HP Prime Python runs consecutive programs - Pellidon - 09-29-2023, 05:47 PM
RE: HP Prime Python runs consecutive programs - Guenter Schink - 09-29-2023, 06:31 PM
RE: HP Prime Python runs consecutive programs - toml_12953 - 09-29-2023, 08:36 PM
|
User(s) browsing this thread: 2 Guest(s)