ok here goes
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# The next functions calculate Resonant Frequency
#
# Given: Cpf, Luh
# Returns: Resonant Frequency in MHz
#
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
def _ResFreqMHz(Cpf, Luh):
''' calculates resonance Cpf given Luh for an RF circuit '''
return ((10**3 / (2*math.pi(math.sqrt(Cpf * Luh)))))
def main():
pass
Cpf = 500
Luh = 500
ResonantFreq =_ResFreqMHz (Cpf, Luh)
print (ResonantFreq)
if __name__ == '__main__':
main()
and then I get back:
File "C:\Python34\Lib\site-packages\Hamath.py", line 189, in _ResFreqMHz
X = (10**3 / (2*math.pi(math.sqrt(Cpf * Luh))))
TypeError: 'float' object is not callable
ignore all the file path stuff.. its because this was called like the math library might be called and was external ..
funny but I have looked thoughout all of my docs... including on the Python home page and found nothing about error messages.. unless I missed it. Now that is possible because sometimes the brain doesnt work too swiftly these days.
Poe