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
1. The position of a particle moving along a coordinate axis is given by: s(t) = t^2 - 5t + 1. a) Find the speed of the particle
zimovet [89]

Answer: \left |  2t-5\right |,\ 2,\ 2t-5

Step-by-step explanation:

Given

Position of the particle moving along the coordinate axis is given by

s(t)=t^2-5t+1

Speed of the particle is given by

\Rightarrow v=\dfrac{ds}{dt}\\\\\Rightarrow v=\dfrac{d(t^2-5t+1)}{dt}\\\\\Rightarrow v=\left |  2t-5\right |

Acceleration of the particle is

\Rightarrow a=\dfrac{dv}{dt}\\\\\Rightarrow a=2

velocity can be negative, but speed cannot

\Rightarrow v=\dfrac{ds}{dt}\\\\\Rightarrow v=\dfrac{d(t^2-5t+1)}{dt}\\\\\Rightarrow v=2t-5

3 0
3 years ago
Help Asap! 20 Points What is value of x and y?
Sergio039 [100]
The answer is a i think but if u get it wrong im sorry
4 0
3 years ago
Which of the following numbers are less than nine over four
allochka39001 [22]

Answer:

option B and C

Step-by-step explanation:

option B and C

5 0
3 years ago
4x + 4y + 2z = 8
Vikentia [17]
The answer is no, because the first two equations are right but the third equation equals -16 instead of -15. So the answer is no (2,-2,4) is not the solution to all the system of equations.
5 0
3 years ago
What is the lateral surface area of the square pyramid represented by this net?Enter your answer in the box. ft²A square pyramid
Reika [66]

Answer:

The awnser is 176

Step-by-step explanation:

i have taken the test and got a 90 on it so yea

8 0
3 years ago
Other questions:
  • Which of the following factors is not used to categorize terrestrial biomes? temperature precipitation racial distribution altit
    6·2 answers
  • Graphing Logarithmic Expressions In Exercise, sketch the graph of the function.<br> y = In x - 3
    5·1 answer
  • Please answer ASAP!<br><br> The number 650,000 written in scientific notation would be _____.
    10·2 answers
  • 2. The original price of a T.V. is $1,100. During a Christmas sale, the T.V. is discounted 20%. What is the final price of the T
    9·1 answer
  • Construye un rectángulo de 12 cm de altura y 5 cm de ancho (Píntalo). Luego a) Calcula el perímetro del rectángulo. B) Calcula e
    7·1 answer
  • An economist would like to estimate a 99% confidence interval for the average real estate taxes collected by a small town in Cal
    8·1 answer
  • Helpppppp please ASAPpppppppppppppp!!!!!!!!!!!!!!!!!!
    14·1 answer
  • PLEASE HELP IN ALGEBRA 2
    5·1 answer
  • Answer please I’m dying from math
    5·1 answer
  • Learning Task 3: Find the rate. 1) 1 is what percent of 10? 1 2) 10 is what percent of 20? 10 3) 5 is what percent of 25? 5 4) W
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!