17-3
3. Perform the key operations below to input each line of the py script.
You can use the • Python mode Catalog Function (page 17-9) for more efficient input of
functions and commands. In the key operations below, text strings that are underlined
and included in parentheses indicate function and command names input with the Catalog
Function.
Perform this key operation: To input this:
!e(CATALOG)6(CAT)d(math)((I)(import math)w
w
import math
a5(A⇔a)v(A)!.(=)
!e(CATALOG)6(CAT)c(Built-in)((I)i(N)/(T)
(int())w
!e(CATALOG)ff(input())w
aZ(")a5(A⇔a)v(A)!.(=)a.(SPACE)
aZ(")eew
A=int(input("A= "))
a5(A⇔a)*(S)!.(=)c*
!e(CATALOG)6(CAT)d(math)h(M)(math.)w
!x(')de*a5(A⇔a)v(A)xw
S=2*math.sqrt(3)*A**2
a5(A⇔a)c(V)!.(=)
!e(CATALOG)(math.)w
!x(')ce/d*a5(A⇔a)v(A)^dw
V=math.sqrt(2)/3*A**3
!e(CATALOG)6(CAT)c(Built-in)e(P)g(R)(print())w
aZ(")a5(A⇔a)*(S)!.(=)aZ(")
,a5(A⇔a)*(S)ew
print("S=",S)
!e(CATALOG)(print())w
aZ(")a5(A⇔a)c(V)!.(=)aZ(")
,a5(A⇔a)c(V)
print("V=",V)
4.
Perform the key operation below to run the currently displayed py script.
2
(RUN)1(Yes)
(Saves the script to a file before running it.)
The operations below are performed after the script is
running.
ba(Inputs the value of A)
w
Value input for A
Execution result (S value)
Execution result (V value)
Following the operation above, you can re-run the same py script by performing the •
operation below.
1. Press J to return to the script editor screen.
2. Press 2(RUN).