Skip to content

Instantly share code, notes, and snippets.

@laclefyoshi
Created February 5, 2011 04:36
Show Gist options
  • Save laclefyoshi/812208 to your computer and use it in GitHub Desktop.
Save laclefyoshi/812208 to your computer and use it in GitHub Desktop.
main
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