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
nata0808 [166]
3 years ago
12

Read 3 integer numbers from the user; these numbers represent the lengths of 3 straight lines. From the 3 lengths, determine whe

ther a triangle can be formed with the corresponding lines. If it is possible to form a triangle, determine whether the triangle is a right triangle or not. The rules to be used are: 1. To form a triangle where all lines’ ends meet (form vertices), the sum of the lengths of two sides must be greater than the length of the third side. This short video illustrates this concept: How to determine if the three sides make up a triangle. 2. Per the Pythagorean theorem: in a straight triangle, the square of the length of the longest side (the hypotenuse) is equal to the sum of the squares of the lengths of the other two sides. 3. The user can enter the lengths of each line in any order, i.e.: you may not assume that the first length is the longest or the smallest or the middle value.
Mathematics
1 answer:
Elza [17]3 years ago
4 0

Answer:

Written in Python

print("Enter three sides of a triangle: ")

length = []

for i in range(0,3):

    inp = int(input(""))

    length.append(inp)    

length.sort()

if length[1]+length[2] > length[0] and length[0] + length[2] > length[1] and length[0] + length[1] > length[2]:

    print("Triangle")

    if length[2]**2 == length[0]**2 + length[1] **2:

         print("Right Angled")

    else:

         print("Not Right Angled")

else:

    print("Not Triangle")

Step-by-step explanation:

This line prompts user for sides of triangle

print("Enter three sides of a triangle: ")

This line declares an empty list

length = []

The following iteration gets user input

<em>for i in range(0,3):</em>

<em>     inp = int(input(""))</em>

<em>     length.append(inp)    </em>

This line sorts user input

length.sort()

The following if condition checks if user input is triangle

if length[1]+length[2] > length[0] and length[0] + length[2] > length[1] and length[0] + length[1] > length[2]:

The following is executed is the if condition is true

    print("Triangle")

The following if condition checks if user input forms a right angled triangle

<em>     if length[2]**2 == length[0]**2 + length[1] **2:</em>

<em>          print("Right Angled")</em>

<em>     else:</em>

<em>          print("Not Right Angled")</em>

This is executed if user input is not a triangle

<em>else:</em>

<em>     print("Not Triangle")</em>

<em></em>

You might be interested in
What is the contrapositive of the conditional statement? If two variables are directly proportional, then their graph is a linea
Triss [41]

Answer:

D. "If the graph of two variables is not a linear function, then the two variables are not directly proportional"

Step-by-step explanation:

The contrapositive of a statement is basically you changing the conditional part of the statement with its result and then finding the negative of both. This is called Contraposition.

So, for the statement given:

"If two variables are directly proportional, then their graph is a linear function."

The contrapositive will be:

"If the graph of two variables is not a linear function, then the two variables are not directly proportional"

7 0
3 years ago
Can someone please help me with this
krek1111 [17]

Step-by-step explanation:

0.1 repeating is 1/9, so the number is 4 1/9.

5 0
3 years ago
the wildcats scores 24 more than twice the number of points that the stallions scored. Altogether, the two teams scored a total
Xelga [282]

Answer:

42?

Step-by-step explanation:

6 0
3 years ago
Plz help!!! I’ll give 10 points to the first person to give me a correct answer...I need to get my grade up before the end of th
Lilit [14]

Answer:

A= 30

B= 60

C= 90

Step-by-step explanation:

A is already shown.

B has a right angle making it 90 degrees.

A triangle is 180 degrees 30+90= 120

180-120=60

3 0
2 years ago
What is the simplified form of -64 1/3? Need Help ASAP, will make brainliest answer :)!!!
alexgriva [62]
-64 1/3

disregard the negative sign for the moment...
to turn a mixed number into an improper fraction, take ur whole number (63) and multiply it by ur denominator (3) and u get (64 * 3) = 192....now add that to ur numerator (1) and u get (192 + 1) = 193...now put that over ur original denominator (3) and u get 193/3.....now put ur negative sign back....and u have - 193/3.....simplified form, does not reduce
7 0
3 years ago
Other questions:
  • If mc020-1.jpg and mc020-2.jpg, what is the domain of mc020-3.jpg?
    12·2 answers
  • What are the main units of length in the US.
    7·1 answer
  • How to find the smallest distance between two lines?
    11·1 answer
  • DOMAIN:<br> RANGE<br> FUNCTION:<br><br> PLZZ HELP HURRYY‼️‼️‼️
    12·2 answers
  • Help quickkkkkk- I’m terrible at dis stuff
    15·1 answer
  • Hexagon DEFGHI is translated on the coordinate plane below to create hexagon D'E'F'G'H'I'.
    15·1 answer
  • . Andrew is showing his work in simplifying −4.5 + 4.2 + 5.6 − 7.3. Identify any errors in his work or in his reasoning. Write f
    5·1 answer
  • Gizela teaches 5 yoga classes that are each 3/4 hour. Use the drop down menu to complete the equation below to find the number o
    8·1 answer
  • Select the statement that describes this expression: fraction 1 over 2 x (734 − 246).
    10·2 answers
  • Find the value of x.<br> X<br> 5x - 9<br> 3x + 15
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!