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 type of software is an antivirus?
Kamila [148]

Answer: what type of software is an antivirus?

Answer: A security software

Explanation:

Antivirus software is a type of security software designed to protect users from multiple types of malware, not just viruses. The software is a risk management tool that scans devices regularly and on-demand for known malware and suspicious behavior associated with malware.

6 0
3 years ago
Read 2 more answers
* 8) Embedded operating systems are specialized software meant only to manage the
Ede4ka [16]

Answer:

True

Explanation:

Embedded operating systems are operating systems which supports hardware which is not a computer and allows the hardware to perform its task.

An example of a device with an embedded operating system is an SD card. The operating system on the card allows the card to be readable by the computer which its is plugged to.

Other examples of hardware with embedded systems are traffic lights, digital televisions, ATMs, point of sale (POS) and digital cameras.

3 0
3 years ago
How can photography allow us to view the world around us in different ways?
Ymorist [56]
It captures a single moment that one might not see with a naked eye. It shows the beauty and the essence of simple things in one exact moment. And it allows the viewer to take more time to reflect on what is captured and really find meaning within it.
6 0
4 years ago
Read 2 more answers
In microsoft word, when you highlight existing text you want to replace you are
RSB [31]
You are changing the word
8 0
3 years ago
Ava calls tech support because she is unable to send information that a customer has requested. The tech support person tells he
Blizzard [7]

Answer:

Outlook as it is a common email aplication which may experience some issues

Explanation:

7 0
3 years ago
Other questions:
  • nside of your organization that checks how often client machines access it. If a client machine hasn't accessed the server in th
    6·1 answer
  • Write a complete Java method that returns an integer. The method declares a Scanner object, then prompts the user for a series o
    12·1 answer
  • What statement best describes operating systems?
    12·1 answer
  • What are some ways to find out what skills you need to develop at work? Check all of the boxes that apply.
    15·2 answers
  • Identify a characteristic of electronic meeting systems.
    10·1 answer
  • If you are going to refer to a few dozen classes in your application, how do<br> you do it?
    6·1 answer
  • Implement a program called genes.py that does the following: a. Reads a DNA sequence t as command-line argument b. Reads strings
    9·1 answer
  • What is wrong with the following code?
    11·1 answer
  • What will result if the following code is used in an HTML file? New Title
    13·2 answers
  • List 1 reason people invest in Cryptocurrency
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!