Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- print("Hi, I'm gigi, your bot.")
- users_name=input("What's your name dude ?: ")
- print("Welcome "+users_name+ ".Let's calculate the hypotenuse of a right triangle")
- print("Enter first the a and b lengths of your triangle ")
- input1=input("a is : ")
- input2=input("b is : ")
- a=float(input1)
- b=float(input2)
- square_a=math.pow(a,2)
- square_b=math.pow(b,2)
- result=math.sqrt(square_a + square_b)
- print(result)
- output=str(result)
- print("The hypotenuse of a triangle of lengths ( a= " + input1 + ", b= " + input2 + ") is " + output)
Add Comment
Please, Sign In to add comment