Download Print this page

Casio fx-CG50 User Manual page 589

Hide thumbs Also See for fx-CG50:

Advertisement

Sample 2: Importing a Module
Purpose
import
imports a module and makes it possible to run the
functions defined within it. Use the syntax below to execute
function within the module.
<module name>.<function name>
Description
Imports the math module and makes it possible to run the function defined
import math
by it.
P=math.pi
Defines variable P as
print(P)
Outputs the value stored in variable P.
Execution Result
Sample 3: Defining a User-defined Function
Purpose
def
defines a user-defined function.
The script below recalls and uses the py script created under
"Sample 4: Importing a py File".
pi
, which is defined in the math module.
17-30

Advertisement

loading

This manual is also suitable for:

Fx-cg50 auFx-cg20Fx-cg20 auFx-cg10