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
26 qt = how many gal and qt
QveST [7]
The answer is 6.5 

welcome!

8 0
3 years ago
Read 2 more answers
I RLLY NEED HELP FAST!!!!!!!!!!!!!!!
rodikova [14]
Hello!

You look at where J is 2 and look at where the line is for K

At J = 2, K = 20

The answer is 20

Hope this helps!
7 0
4 years ago
HELP ME PLEASE, I'D LIKE TO UNDERSTAND HOW TO DO THIS TOO SO I'LL GIVE BRAINLY FOR THE RIGHT ANSWER WITH GOOD AND UNDERSTANDING
umka2103 [35]

Answer:

34 goes in the blank.

Step-by-step explanation:

Triangle ABC is congruent to triangle TUV implies the following:

Angle A is congruent to angle T.

Angle B is congruent to angle U.

Angle C is congruent to angle V.

Side AB is congruent to side TU.

Side BC is congruent to side UV.

Side CA is congruent to side VT.

Note: Order tells you everything in a congruence statement.

Since side BC is congruent to UV, then the measure of side BC is equal to the measure of side UV.

8x+2=7x+6

Subtract 7x on both sides:

1x+2=6

x+2=6

Subtract 2 on both sides:

x=6-2

x=4

So if x=4, then the measure of side BC is 8x+2=8(4)+2=32+2=34.

So the measure of BC is 34 cm.

5 0
4 years ago
Can someone please help me
dalvyx [7]

Answer:

its 31,530

Step-by-step explanation:

because they have 36,064 after the marriage filing which is 4,534 they would have 31,530 left to spend or 4,534 to pay

3 0
2 years ago
Use the quadratic formula to solve x-6x+8=0
Sedbober [7]

x  = [-(-6) +/- sqrt((-6)^2 - 4*1 * 8))] / 2

   =  (6 + sqrt4) / 2 ,  ( 6 - sqrt4)/2

  =  4 , 2
6 0
4 years ago
Other questions:
  • What is the midpoint of the segment below?
    5·1 answer
  • 0.008 times what equals 0.8
    7·1 answer
  • Simple question...but yet i'm unable to answer.... help please?....
    15·1 answer
  • solve this problem by using a 5d process or writing and solving an equation. No matter which method you use, be sure to define y
    11·1 answer
  • How tall is a building that casts a 73 foot shadow when the angle of elevation of the sun is 29
    12·1 answer
  • Convert 0/17 to a decimal
    13·2 answers
  • Four students equally share 1\4 poud of peanuts.How of a pound of peanuts did each student get?
    8·1 answer
  • If two lines never meet, no matter how long they are, they said to be _______ lines.
    6·2 answers
  • At your hardware store, you buy hammers for a $30.00 a dozen and sell them for $3.50 each. What is the percent markup for the ha
    9·1 answer
  • Pam wants to make a box with a base of 12 square inches. The
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!