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
riley baked 10 cookies with 2 scoops of flour. how many scoops of flour does riley need in order to bake 15 cookies
Sergeu [11.5K]
4 and a half scoops of flour
4 0
3 years ago
Read 2 more answers
1. -4x + 5 = 2x - 7<br> 2. 6x - 8 = 4x + 2<br> 3. -3x - 5 = 2x + 10
Svetllana [295]

Answer: 1. x=2

 2. x=5    

 3.x=-3

Isolate the variable by dividing each side by factors that don't contain the variable.

Move all terms not containing x    to the right side of the equation.

Hope this helped

7 0
3 years ago
Seven students chose integers: -16, 12, -13, -6, 5, 6 and 1 Order the numbers from least to greatest. When all numbers are order
Lorico [155]

Answer:-16<-13<-6<1<5<6<12

1

-16

12

Step-by-step explanation:

8 0
3 years ago
What equation is solved by the graphed systems of equations? Two linear equations that intersect at the point negative 1, negati
GuDViN [60]

To solve this problem, we have to manually solve for the value of x for each choices or equations. The correct equation will give a value of -1 since the linear equations intersects at point (-1, -4).

<span>1st: 7x + 3 = x + 3</span>

7x – x = 3 – 3

6x = 0

<span>x = 0                (FALSE)</span>

 

<span>2nd: 7x − 3 = x – 3</span>

7x – x = 3 – 3

6x = 0

<span>x = 0                (FALSE)</span>

           

<span>3rd: 7x + 3 = x − 3</span>

7x – x = - 3 – 3

6x = -6

<span>x = -1               (TRUE)</span>

 

<span>4th: 7x − 3 = x + 3</span>

7x – x = 3 + 3

6x = 6

<span>x = 1                (FALSE)</span>

 

Therefore the answer is:

<span>7x + 3 = x − 3</span>

6 0
3 years ago
The Sears Tower in Chicago is 1450 feet high. A model of the tower is 48 inches tall. What is the ratio of the
Leni [432]

Answer: choice a.

Step-by-step explanation:

1 feet = 12 inches.

Sears tower = 1450 * 12 = 17400 inches.

Now,

48 : 17400

= 2 : 725

5 0
3 years ago
Other questions:
  • What is 13 nickels combined with 6 dimes?
    5·2 answers
  • Which inequality can be used to find the possible number of nickels, n, in her coin collection.
    6·1 answer
  • The mean weight 20 students in a room is 65 kg one student one student who weight is 88kg went into the room what is the new mea
    6·1 answer
  • Find the opposite integer of 6
    9·1 answer
  • Ryan shaded 70 squares on his hundredths grid. Sarah shaded 80 squares on her hundredths grid Part A Which value is greater than
    13·1 answer
  • The teacher buys 24 small boxes, 12 medium boxes, and 5 large boxes. She had to return 3 small boxes due to defects. How many co
    13·1 answer
  • Select all that apply.
    14·2 answers
  • The radius of a circle is 1 foot. What is the circle's area?
    14·1 answer
  • How long will it take for a certain population of fish to triple if the relative growth rate is 45% per year?
    14·1 answer
  • The question is in the photo above plz answer
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!