ee_calc_menu.py

Created by capnmattttt

Created on April 15, 2018

963 Bytes

Menu front end for ee calculation scripts


from engnote import *
from eecalculations import *

def main():
    ans=True
    while ans:
    
        print("""
        1. RC Filter Cut-Off
        2. LC Filter Cut-Off
        3. Impedance of a Capacitor
        4. Impedance of a Inductor
        5. Voltage Divider Calculator
        99. Exit/Quit
        """)
        ans=input("Select a calculation? ")
        if ans=="1":
          print("\n RC Filter Cut-off")
          rcf3dB()
        elif ans=="2":
          print("\n LC Filter Cut-off")
          lcf3dB()
        elif ans=="3":
          print("\n Impedance of a Capacitor")
          z_cap()
        elif ans=="4":
          print("\n Impedance of a Inductor")
          z_ind()
        elif ans=='5':
            print("n Voltage Divider Calculator")
            v_divider()
        elif ans=="99":
          print("\n Goodbye") 
          ans = None
        else:
           print("\n Not Valid Choice Try again")

main()