### First input is for Side A ### Second Input is for Side B print "Finding the hypotenuse in a 90 degree angle." def answer(side_a, side_b): return side_a ** 2.0 + side_b ** 2.0 def hypotenuse(side_a, side_b): return answer(side_a, side_b) ** 0.5 print side_a = float(raw_input()) print "The Length of Side A is", side_a side_b = float(raw_input()) print "The Length of Side B is", side_b print "The Length of the Hypotenuse is", hypotenuse(side_a, side_b)
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