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
Which mumber is between point s and point t on the mumber line? 3 4 5 6 7
kondor19780726 [428]
5or 6 I don't remember
3 0
3 years ago
Could someone please solve this and explain their answer? 2x+39&lt;9
zhannawk [14.2K]

Step-by-step explanation:

i hope you understood....

4 0
3 years ago
Sergio has decided to weigh his reference books. His largest encyclopedia weighs 7.49 pounds, and his largest dictionary weighs
Oksanka [162]
To properly make the comparison between the weights of the books, we compute for their weights in similar units. For this item, we need to convert the weight of the first book to kilogram.
             conversion:
                             Book 1 :    (7.49 lbs) x (0.4535924 kg / 1 lb) = 3.397 kg
Since the second book weights 3.91 kg, it is heavier than the encyclopedia. Subtracting the weight of the first book from the second one will give us an answer of 0.51 kg. Thus, the answer to this item is letter D. 
6 0
4 years ago
Read 2 more answers
What are the x-intercepts of the quadratic function?
Vaselesa [24]
X=-2 and x=5 solve it in factoring form by finding what multiplies to give you -10 and adds to give you -3 using 1 and -10
7 0
3 years ago
88.27 rounded to the nearest one
Paladinen [302]

Answer:

[See Below]

Step-by-step explanation:

_______________________________

✦ Round 88.27 to the nearest whole number:

  • 88

✦  Round 88.27 to the nearest Tenth:

  • 88.3

_______________________________

~<em>Hope this helps Mate. If you need anything feel free to message me. </em>

<em />-Your~ Friendly~ Answerer,~ Shane<em> ☺</em>

6 0
3 years ago
Other questions:
  • Please Answer this! I am Desperate! I will Give Brainliest For Best Answer!!!!!
    13·2 answers
  • John uses 9 eggs to make 5 burritos. How many burritos can he make with 27 eggs?
    13·2 answers
  • In a woodworking class, you need to make five triangles out of plywood. Each triangle has a height of 6 inches and a base of 14
    15·1 answer
  • I need help someone= R-7=1
    13·2 answers
  • What is the answer to question 12
    8·2 answers
  • On a later day, he asked the same group of 10 friends to throw a ball again and collected another set of data. The median of the
    6·2 answers
  • HELP PLEASE !!!
    6·2 answers
  • What is the difference between the most popular subject and the least popular subject ?? ​
    9·1 answer
  • 30 days 119,600 per year pay ?
    10·1 answer
  • 23 gram put into milligrams
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!