Instructions

Write a program that accepts the lengths of three sides of a triangle as inputs. The program output should indicate whether or not the triangle is a right triangle.

Recall from the Pythagorean theorem that in a right triangle, the square of one side equals the sum of the squares of the other two sides.

Use The triangle is a right triangle. and The triangle is not a right triangle. as your final outputs. An example of the program input and proper output format is shown below:

Enter the first side : 3
Enter the second side: 4
Enter the third side : 5

The triangle is a right triangle.

Any of the three sides of the triangle could be the hypotenuse. The program should handle this appropriately.


Flowchart

To enlarge flowchart turn side navigation off, Click on Side Navigation button on in the top navigation bar to change to Side Navigation button off

Flowchart
Flowchart

Starter Code

"""
Program: right.py
Project 3.2

Determine whether or not three input sides compose a
right triangle.
"""

# Request the inputs

# Compute the squares

# Determine the result and display it

Tags: