Post Reply 
Python comes to the Casio fx-CG 50
Yesterday, 06:07 PM
Post: #51
RE: Python comes to the Casio fx-CG 50
(Yesterday 02:39 AM)bxparks Wrote:  
(Yesterday 02:25 AM)toml_12953 Wrote:  That works if I don't have the program in a def block but if I do (see below) I get back to the >>> prompt and nothing I type seems to be able to run the program.

Code:
def nqueens():
....

The easiest solution is probably to add the single line
Code:
nqueens()
at the end of your file and re-upload.

It *might* be possible to type the following in the SHELL screen:
Code:
>>> from nqueens import *
>>> nqueens()
(where `nqueens.py` is the name of your file).

But it is sooo painful to type anything on the calculator keypad, I typed "from" then wanted to shoot myself.

You might have missed it. In my original post I said I can't even import nqueens. All I get is file not found. I checked the spelling and capitalization but no luck.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python comes to the Casio fx-CG 50 - toml_12953 - Yesterday 06:07 PM



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