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!")

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.