program5_3.py Write a program about triangles. You need two files, a module file and an executable file with a main method. Include Psudocode to explain your code.  The module file (defines two functions): One function that takes the three sides of a triangle as arguments. It returns True if the sides define a right triangle and False if it doesn't. HINT: This is easiest with a Math module function. The other function must use Heron's Formula to calculate and return the area of a triangle. Learn about Heron's formula online. The main file: Prompt the user to enter the three sides (longest first) of the triangle. Use integers only. Make sure that no side is longer than the sum of the other two sides. Call the function that returns a boolean and use it to output whether the triangle is a right triangle, or not. Call the function that returns the area. Display the value returned with two decimal places.   Two Example outputs Enter longest side of the triangle 14 Enter any another side of the triangle 11 Enter third side of the triangle 10 Not a right triangle Area is 54.64 >>>  Enter longest side of the triangle 10 Enter any another side of the triangle 8 Enter third side of the triangle 6 Triangle is a right triangle Area is 24.00

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

program5_3.py
Write a program about triangles. You need two files, a module file and an executable file with a main method. Include Psudocode to explain your code. 
The module file (defines two functions):

  • One function that takes the three sides of a triangle as arguments. It returns True if the sides define a right triangle and False if it doesn't. HINT: This is easiest with a Math module function.
  • The other function must use Heron's Formula to calculate and return the area of a triangle. Learn about Heron's formula online.
The main file:
Prompt the user to enter the three sides (longest first) of the triangle. Use integers only. Make sure that no side is longer than the sum of the other two sides. Call the function that returns a boolean and use it to output whether the triangle is a right triangle, or not. Call the function that returns the area. Display the value returned with two decimal places.
 
Two Example outputs
Enter longest side of the triangle 14
Enter any another side of the triangle 11
Enter third side of the triangle 10
Not a right triangle
Area is 54.64
>>> 
Enter longest side of the triangle 10
Enter any another side of the triangle 8
Enter third side of the triangle 6
Triangle is a right triangle
Area is 24.00
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,