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 wanna pass this help me please-
Simora [160]

Answer:

C

Step-by-step explanation: hope this helps :)

5 0
3 years ago
Someone can help?? ​
oee [108]

Answer:

Step-by-step explanation:

let  cos^{-1}x=t

cos t=x

when x=1,cos t=1=cos 0

t \rightarrow 0

\lim_{x \to 1} \frac{1-\sqrt{x}}{(cos ^{-1}x)^2 } \\= \lim_{t \to 0} \frac{1-\sqrt{cos~t}}{t^2} \times \frac{1+\sqrt{cos~t}}{1+\sqrt{cos ~t}} \\= \lim_{t \to 0} \frac{1-cos~t}{t^2(1+\sqrt{cos~t})}}  \\= \lim_{t \to 0 }\frac{2 sin^2~\frac{t}{2}}{t^2(1+\sqrt{cos~t})}} \\= 2\lim_{t \to 0 }(\frac{sin~t/2}{\frac{t}{2} })^2 \times \frac{1}{4} \times  \lim_{t \to 0 }\frac{1}{1+\sqrt{cos~t}} \\=\frac{2}4} \times 1^2 \times \frac{1}{1+\sqrt{cos~0}} \\=\frac{1}{2} \times \frac{1}{1+1} \\=\frac{1}{4}

4 0
4 years ago
Jon buys 3 shirts for 20$ write as a rate
steposvetlana [31]

Answer:

$6.66 per shirt

Step-by-step explanation:

20/3 = 6.66

It costs $6.66 per shirt, therefore the rate would be 6.66/shirt

7 0
3 years ago
The perimeter, P, of a rectangle is found using the formula P = 2l + 2w, where l is the length of the rectangle and w is the wid
pogonyaev

Answer:

(P - 2l)/2

Step-by-step explanation:

4 0
4 years ago
Read 2 more answers
What is the surface area of the prism below<br> 2.5 m<br> 2 m<br> 10 m<br> 1.5 m
Kipish [7]

Answer:

5 by 11

Step-by-step explanation:

Brainliest pls

6 0
3 years ago
Other questions:
  • What is the measure of ∠A and ∠C?
    7·2 answers
  • HELP FASTTT
    8·2 answers
  • Whole numbers between 200 and 220 that are multiple of 3
    9·1 answer
  • PLZ ANSWER THIS FOR THE BABY DUCKS
    14·1 answer
  • PLEASE HELP ME!!!!I NEED HELP
    7·1 answer
  • Travis has the following problem for homework:
    8·1 answer
  • Help me please! is compound interest​
    9·1 answer
  • [ 1 ] check whether -3 and 3 are the zeroes of the polynomial x² - 9.
    12·1 answer
  • Solve the inequality and graph its solution.
    15·1 answer
  • The diagram shows a circle with centre
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!