1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yuradex [85]
2 years ago
15

Write a program that accepts the lengths of three sides of a triangle as inputs. the program output should indicate whether or n

ot 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.
Computers and Technology
1 answer:
omeli [17]2 years ago
4 0

The code will have to obey the Pythagorean theorem that says square of the hypotenuse side is equals to the sum of the squares of the other legs.

<h3>How to write a code that check if a triangle is a right angle by using Pythagoras theorem?</h3>

The code is written in python.

def right_triangle(x, y, z):

    if x**2 + y**2 == z**2 or y**2 + z**2 == x**2 or z**2 + x**2 == y**2:

         print("it is a right angle triangle")

    else:

         print("it is not a right angle triangle")

right_triangle(6, 10, 8)

<h3>Code explanation</h3>
  • we defined as function named "right_triangle". x, y and z are argument which are the length of the triangle.
  • Then we check if the sides obeys Pythagoras theorem.
  • If it does we print a positive statement else we print a negative statement.

Learn more about python at: brainly.com/question/21437082

#SPJ4

You might be interested in
If you have a database with birthdates, and you would like to find everyone who was born before June 16, 1967, what would you en
Tcecarenko [31]

Answer:

<June 16,1967

Explanation:

7 0
3 years ago
Read 2 more answers
What is the real meaning of hack and crack?
vovangra [49]
Hack means hack computer and crack means I guess your behind
7 0
3 years ago
In which type of attack does the user respond to several external communication requests? Harry wants to watch a movie online by
Shkiper50 [21]

Answer:

They normaly do that to put a virus on your device And hack into your private info like passwords and credit cards and stuff like that

Explanation:

Always watch a movie leagly

3 0
3 years ago
Which country has the most common features of analogue and digital computer​
ANTONII [103]

Explanation:

i don't think rhis question could be..

4 0
3 years ago
Is the conversation recorded when the party answers or when they dial the number?
Len [333]
I think it’s when the party answers
3 0
3 years ago
Other questions:
  • The ________ multiple-selection PHP statement is used to handle decision making and can be used to replace multiple if and if...
    12·1 answer
  • Answers please !!!!!!!!!!!!!!!!!!!!!!!!!!!
    8·1 answer
  • What inventor patented the first American movie projector?
    14·2 answers
  • You have a multi-domain Windows Server 2008 forest. You need to make a shared folder available to users from several domains. Wh
    9·1 answer
  • Which rule should be followed to stay safe online
    5·1 answer
  • Why is it important to do research prior to making a purchase? What types of sources can be helpful (or not helpful!)
    15·1 answer
  • The sun can be an excellent source of natural light.<br> True.<br> False.
    8·2 answers
  • What does command do
    5·1 answer
  • (Print distinct numbers) Write a program that reads in integers separated by a space in one line and displays distinct numbers i
    8·1 answer
  • Which of the following statements best explains how multitasking works in the human mind?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!