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 decimal is 0.77 %
Nana76 [90]

Answer:

0.0077

Step-by-step explanation:

8 0
2 years ago
I need help please Right now if you could!!
11Alexandr11 [23.1K]

Answer:

Step-by-step explanation:

Step 2:       2.8z - 3.4z - 7.2 + 6.6

Step 3:       -0.6z - 0.6

-7 (-15w + 21) + 3(18 - 27w)

step 1: 105w - 147 + 54 - 81w

5 0
3 years ago
Henry mowed 37 lawns out of 60 lawns. what percent of the lawns does henry stilln need to mow
Anarel [89]

Answer:

38 %  

Step-by-step explanation:

1. Percent of lawns mowed

\text{Percent} = \dfrac{\text{Lawns mowed}}{\text{No. of lawns}} \times 100 \% = \dfrac{37}{60} \times 100 \% = 62 \%}

2. Percent of lawns unmowed

% Unmowed = 100 % - 62 % = 38 %

Henry still needs to mow 38 % of the lawns.

7 0
3 years ago
Carmen deposits $2000 into an account that pays simple interest at a rate of 3% per year. how much interest will she be paid in
STatiana [176]
Sn=So(1+p/100*2)

2000*(1+3/100*2)=2000(1+3/50)=2000*53/50=40*53=2120$

My answer:2120$
8 0
3 years ago
If the circle below is cut from the square of plywood below, how many square inches of plywood would be left over? Use π = 3.14,
Elis [28]

Answer:

86in²

Step-by-step explanation:

Find the complete question attached

Area of the circle = πr²

Area of the square = L²

Length of the side of the square

r is the radius of the circle

r = L/2 = 20/2 =10in

Given

Length of the side of the circle = 20in

Area of the square = 20²

Area of the square = 400in²

Area of the circle =π(10)²

Area of the circle = 3.14(100)

Area of the circle= 314in²

Amount of plywood left over = 400in²-314in² = 86in²

8 0
3 years ago
Other questions:
  • if a safety switch has a 1 in 10 chance of failing, how many switches would a company want to install in order to have only a 1
    10·2 answers
  • 6/16 equals 8 over what?
    10·2 answers
  • Laura order a set of blue and black pencils she received 120 pencils and 59% of the pencils were black about how many black penc
    15·1 answer
  • Quiz 3<br> What is the distance between (-9,-6) and (-2,-2)?
    7·1 answer
  • The graph of a system of equations with different slopes will have no solutions. Always Sometimes Never
    5·1 answer
  • Evaluate 15/r -1 when r=5
    5·1 answer
  • PLZ HELP WILL DO ANYTHING FOR THE FIRST CORRECT ANSWERS!!!IF it a guess you will be reported I'm not playing there's GAMES!!
    8·1 answer
  • 1/6 of the garden is used for growing petunias. 3/4 of the Pentunias are pink what fraction of a garden pentunias what fraction
    14·1 answer
  • So so sorry, but i have another one~ in this, the numbers can be used only once
    8·2 answers
  • Need help please with this questions
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!