Created
February 5, 2011 04:36
-
-
Save laclefyoshi/812208 to your computer and use it in GitHub Desktop.
main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
mode = raw_input("mode? ([a]stable or [m]onostable)> ") | |
if(mode == 'a'): | |
calcType = raw_input("result? ([f]req or [r]egister]> ") | |
if(calcType == 'f'): | |
r1, r2, c = map(float, raw_input("r1? r2? c?> ").split(" ")) | |
aFreqCalculate({"r1": r1, "r2": r2, "c": c}) | |
elif(calcType == 'r'): | |
(f, d, c) = map(float, raw_input("freq? duty? c?> ").split(" ")) | |
aResisterCalculate({"freq": f, "duty": d, "c": c}) | |
elif(mode == 'm'): | |
calcType = raw_input("result? ([t]ime or [r]egister]> ") | |
if(calcType == 't'): | |
r1, c = map(float, raw_input("r1? c?> ").split(" ")) | |
mTimeCalculate({"r1": r1, "c": c}) | |
elif(calcType == 'r'): | |
(t, c) = map(float, raw_input("time? c?> ").split(" ")) | |
mResisterCalculate({"time": t, "c": c}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment