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
Round 4,088,432 to the nearest million
olasank [31]

Answer:

4,000,000

Step-by-step explanation:

8 0
3 years ago
Read 2 more answers
3/5x5/4 what the awnser? (HURRY PLZ I NEED HELP)
Ann [662]

Answer:

0.75

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
A rectangle has a length of 72 cm and a width of 56 cm. A second rectangle has the same area as this one, but its width is 21 cm
Anastaziya [24]

Answer:

192

Step-by-step explanation:

Well if the first rectangle is 72 and 56, then we can find the area of that by multiplying length times width which would be 4032, so that would be the area of the second one. then we divide 4032 by 21, which is 192.

P.S, This is my first question answered, so if im wrong please let me know, thank you!

3 0
2 years ago
Plz I really need this i'll give brainiest
Setler79 [48]
I can't sketch it but the answer is 18
8 0
3 years ago
Find the surface area please.
Zinaida [17]

Answer:

Surface Area = 86 cm^2

Step-by-step explanation:

Given:

Triangle,

b = 8 cm

h = 9 cm

Rectangle,

l = 10 cm

w = 5 cm

To Find:

Surface Area = ?

Solution:

Surface Area = b x h /2 + l x w

Surface Area = 8 x 9 / 2 + 10 x 5

Surface Area = 4 x 9 + 50

Surface Area = 36 + 50

Therefore, Surface Area = 86 cm^2

PLZ MARK ME AS BRAINLIEST!!!

8 0
3 years ago
Other questions:
  • Help me please thank you.
    6·1 answer
  • A bucket of ice cream measures 8 inches tall and has a diameter of 12 inches. What is the volume of the bucket of ice cream? (Us
    15·2 answers
  • If you are offered one slice from a round pizza (in other words, a sector of a circle) and the slice must have a perimeter of 24
    15·1 answer
  • Hi what is the answer for this
    8·2 answers
  • What is the value when 18 times of the difference of 15 and 12<br>divided by 6?​
    5·1 answer
  • Please Find the distance between the two points rounding to the nearest tenth (if necessary).
    11·2 answers
  • Which of the two functions below has the smallest minimum y-value?
    6·1 answer
  • Given measure of arcs, solve for the unknown angles
    7·1 answer
  • A reading teacher recorded the number of pages read in an hour by each of her
    5·2 answers
  • What is the median of the following data set?<br> (3, 4, 2, 8, 5)<br> 02<br> 03<br> 04<br> 06
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!