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
What is the quotient of 1+i/<br> 3+4i
gizmo_the_mogwai [7]

Answer: 7/25-1/25i

Step-by-step explanation:

5 0
3 years ago
Read 2 more answers
Pls don’t have much time
Vsevolod [243]

Answer:

the answer is b

Step-by-step explanation:

35 occurs the most on the graph meaning that it's the mode

5 0
2 years ago
Read 2 more answers
PLEASE HELP!!! WILL REWARD!!
BabaBlast [244]
X+y+z=t
simple..
there are no other numbers that we have to follow like (1/2x or 3/4y) so it is just all together=t. the x, y, z will equal t because t is the total number of students taking three languages. And that number should be equivalent to x,y,z combined.

otherwise?? i d k<span />
3 0
3 years ago
Read 2 more answers
You go shopping and spend $264 on shirts and shorts. You purchase a total of 9 items. Each shirt costs $24 and each pair of shor
Kisachek [45]

Answer:

3 shirts, 6 shorts

Step-by-step explanation:

A total of $264 is spent during shopping on shirts and shorts

Each shirt costs $24

Each shorts cost $32

Therefore the quantity of shirts and shorts bought can be calculated as follows

24× 3= 72

32×6= 192

192+72= 264

Hence 3 shirts and 6 shorts were bought

8 0
3 years ago
In Japan. traditionally it was believed that if you folded 1,000 origami cranes, your wish would come true. For a party, Emika i
vfiekz [6]

Answer:

Step-by-step explanation:

Remark

Interesting detail.

Origami Paper is square -- perfectly.

So the properties listed will be related to a square.

Givens

Area = 35 in^2

Formulas

Area = s^2  where s is the length of 1 side.

Perimeter = 4s

Solution

<u>Area = s^2 = 35</u>

s^2 = 35                     Take the square root of both sides.

√s^2 = √35

s = 5.91

<u>Perimeter = 4s</u>

s = 5.91

Perimeter = 4*5.91

Perimeter = 23.66

The way the question is worded, the answer you should submit is

Perimeter = 4 * √35

4 0
2 years ago
Other questions:
  • The ball's height (in meters above the ground), xxx seconds after Antoine threw it, is modeled by: h(x)=-2x^2+4x+16 How many sec
    7·2 answers
  • The figure is the net for a rectangular prism.
    6·2 answers
  • ???????????? Help please!
    12·1 answer
  • Targe
    14·1 answer
  • The difference of the square of a number and 4 is equal to 3 times that number. Find the negative solution.
    6·1 answer
  • Dan makes a pineapple sorbet. He uses 3 lemons. Work out how many people he makes pineapple sorbet for.
    10·1 answer
  • On a number line, there are two numbers, 535 and -8, how far are these two from each other? plz, answer ILL GIVE BRAINLIEST!!!!!
    12·1 answer
  • Which statement is true about 1?
    8·1 answer
  • Brad deposited $4,000 into a savings account that earn 4% compound interest. How much interest did he earn after three years?
    11·1 answer
  • Help pls help me with this question please
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!