User Manual
14-2
k Flow from py File Creation to Running the File
The example below explains the operation flow from creation of a new py file up to running it.
Example: To create a py file that obtains the surface area and volume of a regular
octahedron and to run it to calculate the surface area and volume when
the length of one side is 10. The file name is OCTA.
A
You can obtain the surface area (S) and volume (V) of a regular octahedron
when the length of one side (A) is known using the formulas below.
S = 2'3 A
2
, V = A
3
––––
'2
3
Here we will write a program that, when the py file is run,
prompts for input of A, which is then used in the above
formulas to output the calculation results. In this manual, a
program written in Python (and stored in a py file) is called a
“py script”.
For this example, we will input a py script like the one shown
in the screen shot to the right.
Procedure
1. From the main menu, enter the PYTHON mode.
• This displays the file list screen.
• File names are listed in alphabetical order.
•
The values on the right side of the file list indicate the
number of bytes used by each py file.
2. Create a new file and register a file name*.
Here we will use the procedure below to create a new py file named “OCTA”.
3(NEW)5(
A↔a)j(O)I(C)/(T)v(A)w
• This displays the script editor screen.
* File Names
• You can input up to eight letters (eight bytes) for a file name.
•
A file name can be made up of single-byte alphanumeric characters (A to Z, a to z, 0 to 9).
This calculator does not distinguish between uppercase and lower case letters.
Important!
Note that a file with a name that starts with a numeral or a name that is a Python reserved
word will not run.