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
How does one decide which businesses to invest in.
GREYUIT [131]
As you consider your options, here are seven things you should know about a company before you decide to invest:
Earnings Growth. Check the net gain in income that a company has over time. ...
Stability. ...
Relative Strength in Industry. ...
Debt-to-Equity Ratio. ...
Price-to-Earnings Ratio. ...
Management. ...
Dividends.
3 0
3 years ago
The receptionist’s directly connected laser printer is printing blank sheets. The technician assigned to the trouble ticket has
Studentka2010 [4]

Answer:

Correct option is B: Print a test print from the printer's console

Explanation:

At first thought, a laser print that is printing blank pages would mean that the toner is exhausted and needs to be replaced. However, if after replacing the toner, and the problem of printing blank page continues, the first troubleshoot  step to take is to be sure that the fault is not from the side of the receptionist by printing a test print from the console of the printer.

4 0
4 years ago
When we have signals within 1-2 MHz band, using a waveguide is the most preferred choice for a transmission line. T or F?​
Maksim231197 [3]

Answer:

T

Explanation:

6 0
3 years ago
What decimal value does the 8-bit binary number 10011110 have if?
alexira [117]
Very simple:
<span>10011110 
1st Octet Value = 128
2nd </span>Octet Value = 0  (64)
3rd Octet Value = 0   (32)
4th Octet Value = 16
5th Octet Value = 8
6th Octet Value = 4
7th Octet Value = 2
8th Octet Value = 0 (1)
so we add 128+16+8+4+2=158 and there is your Answer
8 0
3 years ago
Process and procedures are important but not critical to the effective use of computer based information systems.
larisa [96]

Answer:

False

Explanation:

Process and procedures are important and critical to the effective use of computer based information systems.

This is because without process and procedures computer based information systems cannot solve the problems that a business or an organization faces.

Process and procedures define the way computer based information systems is used.

6 0
3 years ago
Other questions:
  • Create a file with a 20 lines of text and name it "lines.txt". Write a program to read this a file "lines.txt" and write the tex
    12·1 answer
  • Suppose you want to encode the numerals 0–9 and the 26 letters of the alphabet, using separate codes for lowercase and uppercase
    13·1 answer
  • When you create a linked object using the object dialog box, you must click the?
    15·1 answer
  • Within a Microsoft Windows environment, who has access rights to the Encrypting File System (EFS) features and functions?
    7·1 answer
  • PLZ ANSWER THESE QUESTIONS FOR 30 POINTS AND BRAINLIEST!
    9·1 answer
  • Name any two objectives of a business​
    7·1 answer
  • Why would a user want to resend a message? Check all that apply.
    7·2 answers
  • Which of the following is NOT a possible combination of values of the variables in this program when it finishes running?
    6·2 answers
  • Ứng dụng 1 số phần mềm cho quá trình kiểm tra đánh giá
    7·1 answer
  • Choose which statement is wrong by applying your knowledge from the reading. a. A security manager works on tasks identified by
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!