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
chubhunter [2.5K]
3 years ago
9

Write an algorithm for a program which inputs the lengths a, b and c of the three sides of a triangle. The program then determin

es whether the triangle is right-angled and prints out a message to say whether or not the triangle is right angled. You may assume that a is the longest side.
Computers and Technology
1 answer:
svetoff [14.1K]3 years ago
7 0

Answer:

Algorithm:

Step 1: Start

Step 2: Declare variables a,b,c

Step 3: Input a,b,c

Step 4: If a^2 == b^2 + c^2

                  Display "The triangle is right angled"

            Else

                  Display "The triangle is not right angled"

Step 5: Stop

Explanation:

A triangle is right angled if the square of the largest side equals the sum of the square of the other two sides

The algorithm will be based on the above analysis.

This indicated the start of the algorithm

Step 1: Start

This declares required variables

Step 2: Declare variables a,b,c

This gets values for the declared variables

Step 3: Input a,b,c

This checks for the condition to determine right angled triangle

Step 4: If a^2 == b^2 + c^2

If true, this message that states the triangle is right angled is printed

                  Display "The triangle is right angled"

If otherwise

            Else

This message that states the triangle is not right angled is printed

                  Display "The triangle is not right angled"

This indicates the end of the algorithm

Step 5: Stop

The algorithm when implemented in Python is as follows:

<em>a = float(input("a: "))</em>

<em>b = float(input("b: "))</em>

<em>c = float(input("c: "))</em>

<em>if a**2 == b**2 + c**2:</em>

<em>    print("The triangle is right angled")</em>

<em>else:</em>

<em>    print("The triangle is not right angled")</em>

<em></em>

It follows the same explanation as the algorithm

You might be interested in
What predefined match policy allows viewers to watch a claimed video but does not allow ads to display on the video
Alona [7]

Answer:

The correct response is "Track".

Explanation:

  • Tracks encourage the individual that listens to that same music video to miss or ignore that same starting of almost any soundtrack at a certain moment.
  • It might also impact an individual who accompanies a facility that implements or obeys guests.

For obvious reasons, a digital ad service can track client's internet search engine behavior patterns to continue providing accurate recommendations.

6 0
3 years ago
Does anyone have a pdf of the greatest by eddie van der meer????
gregori [183]

Answer

aight' so im finding it but i have to asnwer before someone else so look in the comments for it.

Explanation:

Just wait i getting it rn

3 0
3 years ago
Ask the user for five-coordinate pairs. Store each pair as a tuple, and store all the pairs in a list. Print the slope between a
Margaret [11]

Answer:

y=(1/2) x+3

Explanation:

8 0
3 years ago
Which of the following is an approach to debugging?
lora16 [44]
D) code restructuring
6 0
3 years ago
Read 2 more answers
what are Include the data on usage you gather from your interactions with friends or by listening to people on the radio or on T
borishaifa [10]

Answer:

This has happened many times. I am quite close to my friends. I once asked for making a wood baked Pizza at one of my friends’ houses. Unfortunately. He didn’t have the setup. I was feeling bad as well. However, to add to my relief, he didn’t say he will not make. He also didn’t say he didn’t have the oven. And those double negatives made me happy as I didn’t wanted my friend to take this pain as he had to give an exam after 2 days. However, he even didn’t said he will not order for it. And that double negative confirmed for us a pack of two wood baked pizzas with fountain Pepsi, an hour later. And I was very happy as my friend was able to fulfill the promise.

On TV as well, I have heard a lot of double negatives during NBA matches, and especially on the radio. However, I must say double negatives sometimes happen as certain people are very sensitive, they do not ever want to say no.

Explanation:

Please check the answer.

7 0
3 years ago
Other questions:
  • What is telepresence
    8·1 answer
  • Complex machines are defined by...
    14·2 answers
  • (The Location class) Design a class named Location for locating a maximal value and its location in a two-dimensional array. The
    10·1 answer
  • PowerPoint’s _____ feature can assist you in finding answers to questions such as “How can I specify which slides to print?” a.
    6·1 answer
  • A construction company has an online system that tracks all of the status and progress of their projects. The system is hosted i
    10·1 answer
  • Edhesive 4.1 question 1
    9·1 answer
  • Organizational independence in the processing of payroll is achieved by functional segregations that are built into the system.
    6·1 answer
  • Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem
    7·1 answer
  • A collection of computers, printers, routers, switches, and other devices
    15·1 answer
  • How do motion sensors determine in simation
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!