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
In a class library, 3 out of 4 books are non-fiction. The rest are fiction. a) How many non-fiction books could there be? How ma
iVinArrow [24]

Answer:

Infinitely Many Solutions

Step-by-step explanation:

There can be infinite solutions to this problem

Here are some examples

3   4

6   8

12  16

24 32

48   64

96   128

To get a solution, just multiply both numbers by the same term. I multiplied by 2 each.

Hope this helps :)

-jp524

6 0
2 years ago
Todea what did one pencil say to another mathematics algebra order of operations answer
Serjik [45]
Part 1

6- \frac{18-3^2}{4+(2-3)} =6- \frac{18-9}{4+(-1)}  \\  \\ =6- \frac{9}{4-1} =6- \frac{9}{3} =6-3 \\  \\ =3



Part 2

7-8\div4(3^2-1)=7-8\div4(9-1) \\  \\ =7-8\div4(8)=7-8\div32=7- \frac{1}{2} \\  \\ =6  \frac{1}{2} = \frac{13}{2}



Part 3

2-2(2-5)^2+3^2=2-2(-3)^2+9 \\  \\ =2-2(9)+9=2-18+9=-7



Part 4

(5^2-9\cdot3)^2-11=(25-27)^2-11 \\  \\ =(-2)^2-11=4-11=-7



Part 5

[(2-3)^2-5]\cdot4=[(-1)^2-5]\cdot4 \\  \\ =(1-5)\cdot4=-4\cdot4=-16



Part 6

12-11\cdot2+16\div8=12-22+2 \\  \\ =-8



Part 7

-5+1\cdot3-(7-2^3)=-5+3-(7-8) \\  \\ =-2-(-1)=-2+1=-1



Part 8

8+2\cdot3-14\div7=8+6-2 \\  \\ =12



Part 9

(8-2)^2+\frac{1}{4}[4-3(6-10)]=6^2+\frac{1}{4}[4-3(-4)] \\  \\ =36+\frac{1}{4}[4-(-12)]=36+\frac{1}{4}(4+12)=36+\frac{1}{4}(16) \\  \\ =36+4=40



Part 10

7+(2-3^2)\cdot5=7+(2-9)\cdot5 \\  \\ =7+(-7)\cdot5=7+(-35)=7-35 \\  \\ =-28



Part 11

3-2[2^3+(-1)^3]=3-2[8+(-1)] \\  \\ =3-2(8-1)=3-2(7)=3-14 \\  \\ -11



Part 12

18+6\div3(2^2+5)=18+6\div3(4+5) \\  \\ =18+6\div3(9)=18+6\div27=18+ \frac{2}{9} \\  \\  =18 \frac{2}{9}
8 0
3 years ago
What are the steps to 68 times 49
Anastaziya [24]

so basically what you would have to do is set up your numbers. it would look something like this. 68

                                    × 49

                                 -------------

and would then multiply 9 by 8, 9 by 6. put it down below the line while making sure to carry the numbers if need be. then do the same with the 4 times 8, and 4 by 6.

3 0
3 years ago
An amusement park offers ride tickets for $1.50 each to customers who buy the quantities of tickets indicated in the picture of
lara [203]
D. Customer who buy at least 25 tickets will pay $1.50 each
5 0
2 years ago
Juanita is making bread. She needs 3 1/2 cups of flour. Juanita only has 1/4 measuring cup. How many cups of flour will Juanita
jekas [21]

Answer:

if she uses a 1/4 measuring cup she would need to get 14 1/4 cups of flour

Step-by-step explanation:

7 0
2 years ago
Other questions:
  • The black graph is the graph of y=f(x). Choose the equation for the red graph.<br> Please help me!!!
    14·2 answers
  • Write an expression that represents the volume of a rectangular-shaped box with a length 3 inches less than its height and a wid
    11·1 answer
  • Use a graphic organizer to compare and contrast similar and congruent figures
    11·1 answer
  • What is z+6+z-11=z+49
    10·1 answer
  • Tomas buys a bag of 5 peaches for $3.55. Write and solve an equation to find how much money, m, Tomas paid for each peach
    12·1 answer
  • Find the inequality represented by the graph.
    8·1 answer
  • Which statement is true about the function f(x) = -√-x?
    14·2 answers
  • Two times what wade's age was seven years ago
    15·1 answer
  • Find PM pls help fast​
    15·1 answer
  • A turntable has a diameter of 40 cm what is its circumference ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!