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]
4 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]4 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
O A. -2<br> O B. -1<br> C. 2<br> D. 1
konstantin123 [22]

Answer:

c is the right answer for the problem

7 0
3 years ago
Read 2 more answers
The access code for a vault consists of four digits. The first digit
Vikki [24]

Answer:

5 * 10 * 10 * 9 = 4500

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
What is the median of this data set?
amm1812
4,4,4,5,5,5,6,6,7,8,8,8,9,10,10,10,10
It is the number 7.
3 0
4 years ago
Read 2 more answers
Sofia wants to buy a new pair of jeans. At Pants World, the jeans she wants cost $40 and they're having a 25% off sale. At All C
kondor19780726 [428]

Answer:

number 2

Step-by-step explanation:

5 0
3 years ago
A, b, c, and d please
DIA [1.3K]
<h2>Answers / Step-by-step explanation:</h2><h3>a. What is the length of one side of the square.</h3>

<em>Looking at the image, the radius (r) of the circle appears to cover half of the length of a side of the square. Hence, the side of the square has a length of </em><em>2r</em><em>.</em>

<em />

<u><em>-------------------------------------------------------------------------------------------------------</em></u>

<em />

<h3>b. The formula A= πr² is used to find the area of a circle. The formula A=4r² can be used to find the area of the square. Write the ratio of the area of the circle to the area of the square in the simplest form.</h3>

<em />Ratio=\frac{\pi r^{2} }{4r^2} =\frac{\pi}{4}.

<em>Notice that the value "r²" disappears from the expression because is being multiplied and divided by it at the same time.</em>

<em />

Ratio=\frac{4\pi }{16} =0.7854.

<em />

<u><em>-------------------------------------------------------------------------------------------------------</em></u>

<em />

c. Complete the table.

<em>To complete each cell of the table, simply take the equation of the asked parameter and substitute the value of r by the number indicated in the title of the column. For example, column 3 should be filled out like this:</em>

Area of Circle (units²): π(3)²or 9π.

Length of 1 Side of the Square: 2r= 2(3)= 6.

Area of Square (units²)= 4r²= 4(3)²= 36.

Ratio: \frac{\pi}{4}.

<em>Do the same for all the other columns. </em>

<em>The answers to the table are presented on the attached image</em><em>.</em>

<em />

<u><em>-------------------------------------------------------------------------------------------------------</em></u>

<em />

d. What can you conclude about the relationship between the area of the circle and the square?

<em>They will always have the same value, π/4, regardless of the size of the square and circle. As long as the circle borders meet the square's at the middle of each side of the square, the relationship will be the same</em><em>.</em>

4 0
2 years ago
Other questions:
  • What is the answer for -2(u+1)-5
    15·2 answers
  • this box holds cereal. how many cubic inches of cereal can it hold the size of the box is 6 in,2 in,12 in
    7·1 answer
  • A wildlife management organization is interested in estimating the number of moose in a particular region. Organization employee
    15·1 answer
  • During the school year, each student planted 2 x 10^2 trees as part of a community service project. If there are 3.5 x 10^3 stud
    8·1 answer
  • Solve for n.<br><br> 11(n – 1) + 35 = 3n<br><br> n = –6<br> n = –3<br> n = 3<br> n = 6
    15·2 answers
  • The expression 4x/5-2x/3 is equivalent to<br> A. x/2<br> B. x/5<br> C. x/15<br> D. 2x/15
    9·1 answer
  • What were the only two independent states in Africa by 1912?
    11·2 answers
  • Plz help !! I’ll mark you as a brainlist
    15·2 answers
  • Use the information to complete the task.
    5·1 answer
  • 50 POINTS!<br> what’s the area of both
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!