extfdemo.py

Created by ews31415

Created on February 05, 2021

694 Bytes

Demonstration of how to import a custom module. This must have extf.py loaded to the calculator.


# 2020-02-03 EWS

# import extf.py file
import extf

print("Import any py file.")
print("The source file must")
print("be in memory.")

# \n new line
print("\n")
print("extf.radius(a,b)=abs(a+bi)")
print("extf.angle(a,b=arg(a+bi) in degrees")
print("a=11.25, b=13.36")
print(extf.radius(11.25,13.36))

# other functions
print("\n")
print("extf.pchg: percent change")
print("old,new")
print("pchg(78.95,96.95")
print("a =22.52,b=29")
print(extf.pchg(22.52,29))

print("\n")
print("present value annuity factor")
print("extf.pvaf(n,i%)")
print("pv = pmt*pvaf")
print("pmt=250, n=24, i%=4.5")
print(extf.pvaf(24,4.5)*250)

# more to discover
print("\n")
print("More to discover!")