Pythagorean Theorem Calculator 11-09-2013, 04:24 AM
#1
Pythagorean Theorem:
leg1 squared + leg2 squared = x
sqrt of x = hypotenuse
This program finds the hypotenuse.
I added time just for the fun of it :3
leg1 squared + leg2 squared = x
sqrt of x = hypotenuse
This program finds the hypotenuse.
I added time just for the fun of it :3
Code:
import math
import time
print("Welcome to 'insertnamehere''s Pythagorean Theorem calculator!");
time.sleep(3)
leg1 = int(input("Input the first leg's length."));
leg2 = int(input("Input the second leg's length."));
sta = leg1 * leg1 + leg2 * leg2
answ = math.sqrt(sta)
print(answ, "is the length of the hypotenuse.");





![[+]](https://sinister.li/images/modern/collapse_collapsed.png)



