Download Print this page

Casio CLASSWIZ CG Software User's Manual page 119

Graphics calculator

Advertisement

Python App
The Python app supports a version of MicroPython Version 1.9.4, which has been adapted to run on this
calculator.
Important!
•  Note that generally, MicroPython is different from the Python that runs on a computer. Also, the Python
app does not support all of the functions, commands, modules, and libraries of MicroPython.
•  The Python app performs executions using the MicroPython processing system. Because of this,
calculation results and other data produced by this app may differ from execution results of other
function apps.
Operation Flow
Example:
To create the script shown below and then execute it
Input
def f(x,y,z):
Defines a user-defined function with function name f, and arguments x, y, and z.
if x>0:
If variable x is greater than 0,
t=x+y+z
Defines variable t as the execution result of x+y+z.
else:
Otherwise (if variable x is 0 or less),
t=x-y-z
Defines variable t as the execution result of x-y-z.
return(t)
Makes t the return value.
1.  h > Python
•  This displays Editor and opens a py file named "module.py".
2.  Input the script.
•  For information about input operations, see
Character and Numeric Input" (page 9)
Operations (Same for Editor and Shell)" (page
3.  To execute the resulting script, press >.
•  The imports module.py into Shell.
4.  Call user-defined function f and then input 1, 2, 3 for arguments x, y, and z, respectively.
(1)  Press V to display the Variable menu.
(2)  Select f(,,) and then press O.
(3)  Input 1, 2, and 3 as f arguments.
5.  Press E to execute f(1,2,3).
•  Since x>0, t=x+y+z (=1+2+3) is executed and a value of t=6
is returned.
6.  To return to Editor, press b.
Meaning
"App Alpha
and
"Input
121).
119

Advertisement

loading
Need help?

Need help?

Do you have a question about the CLASSWIZ CG and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Fx-cg100Fx-1au graph