EasyManua.ls Logo

Casio fx-CG50 - Page 589

Casio fx-CG50
667 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
17-30
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
import math
Imports the math module and makes it possible to run the function defined
by it.
P=math.pi
Defines variable P as
pi, which is defined in the math module.
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”.

Table of Contents

Other manuals for Casio fx-CG50

Related product manuals