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
‼️I wnt to know, how to slove this
nalin [4]

t= 86degree 86+86+30+Qdegre= 360 degree add Q×2 that's all

7 0
3 years ago
suppose the annual rate of inflation is about 4% this means that the cost of an item increases by about 4%. write and evaluate a
Mashcka [7]
Cost = (3,500) * (1.04)^years
Cost = (3,500) * (1.04)^4
<span><span><span>Cost = (3,500) * 1.16985856 </span> </span> </span>
<span><span>Cost = </span>4,094.50</span>



4 0
3 years ago
For your parent’s 25th wedding anniversary, you want to restore and enlarge their engagement picture. The photo was originally 3
ziro4ka [17]
I believe the answer would be 60 in high
8 0
4 years ago
Read 2 more answers
A teacher wants to find out the average number of weekly reading hours for her students. She noted the number of reading hours o
taurus [48]

Since the numbers are close together and you do not have any outliers, the mean would be the best measure of central tendency.

The value is

(5+6+7+8+9)/5 = 7

5 0
3 years ago
Here are three different recipes for Orangy-Pineapple juice. Two of these mixtures taste the same and one tastes different.
Assoli18 [71]
Recipes 1 and 2 would taste the same but Recipe 3 would taste different. This is because both Recipe 1 and 2 use a 2:3 ratio, while Recipe 3 uses a 3:4 ratio.

The ratio for Recipe 1 is 4:6 and for Recipe 2 is 6:9, which when simplified is 2:3.

Meanwhile the ratio for Recipe 3 is 9:12, which simplified is 3:4.
5 0
3 years ago
Other questions:
  • Find the diameter of a circle with a circumference of 15.71 yards
    15·1 answer
  • Solve for y in terms of x. 4xy-3y=12
    12·1 answer
  • the length of a rectangle is 6m longer than its width. if the perimeter of the rectangle is 44m find its area
    7·1 answer
  • Lou eat 6/8 of a pizza. what fraction of the in simplest form, Is left over?
    13·2 answers
  • Please help me thank uuu!!!<br> A<br> B<br> C<br> D
    15·2 answers
  • Solve the linear equation: ½(x +10) = ⅔ x - 5
    11·1 answer
  • 20 points for this and brainliest
    12·1 answer
  • In the diagram below, OP is circumscribed about quadrilateral ABCD. What is
    6·1 answer
  • WILL MARK BRAINLIEST IF EXPLANATION GIVEN !! Year 10 - 105 000 sold newspapers. How many newspapers will be sold by year 15 if t
    10·1 answer
  • What happens to the pitch you hear when two sound waves constructively
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!