import math as math def Bx(m,x,z): top= 3*m*x*z, #the numerator for the fraction denomBx= math.pow((math.pow(x,2)+math.pow(z,2)),2.5), #the bottom part of the fraction bx= top/denomBx, print bx, return bx def Bz(m,x,z): #this function allows me to test Bz with differing values, allowing more flexibility topLeftProd= 3*m, denomLeftProd= math.pow((math.pow(x,2) + math.pow(z,2)),1.5), rightProd= ((math.pow(z,2)/(math.pow(x,2) + math.pow(z,2)) -(1/3)), firstProd= topLeftProd/denomLeftProd, ans= firstProd*rightProd print ans, return ans Bx(1,3,2) Bz(1,3,2)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question