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
yuradex [85]
2 years ago
15

Write a program that accepts the lengths of three sides of a triangle as inputs. the program output should indicate whether or n

ot the triangle is a right triangle. recall from the pythagorean theorem that in a right triangle, the square of one side equals the sum of the squares of the other two sides. use the triangle is a right triangle. and the triangle is not a right triangle. as your final outputs.
Computers and Technology
1 answer:
omeli [17]2 years ago
4 0

The code will have to obey the Pythagorean theorem that says square of the hypotenuse side is equals to the sum of the squares of the other legs.

<h3>How to write a code that check if a triangle is a right angle by using Pythagoras theorem?</h3>

The code is written in python.

def right_triangle(x, y, z):

    if x**2 + y**2 == z**2 or y**2 + z**2 == x**2 or z**2 + x**2 == y**2:

         print("it is a right angle triangle")

    else:

         print("it is not a right angle triangle")

right_triangle(6, 10, 8)

<h3>Code explanation</h3>
  • we defined as function named "right_triangle". x, y and z are argument which are the length of the triangle.
  • Then we check if the sides obeys Pythagoras theorem.
  • If it does we print a positive statement else we print a negative statement.

Learn more about python at: brainly.com/question/21437082

#SPJ4

You might be interested in
The following program is supposed to display a message indicating if the integer entered by the user is even or odd. What is wro
Lapatulllka [165]

Answer:

A. The function definition must appear before the function is called

Explanation:

Given

The above lines of code

Required

Determine the error in the program

In python, functions has be defined before they are called but in this case (of the given program), the function is called before it was defined and this will definitely result in an error;

<em>Hence, option A answers the question</em>

The correct sequence of the program is as follows:

<em>def evenOdd(n): </em>

<em>      if n % 2 == 0: </em>

<em>            return "even" </em>

<em>      return "odd" </em>

<em>num = int(input("Enter an integer: ")) </em>

<em>print("The integer is", evenOdd(num)) </em>

<em />

6 0
2 years ago
Executives of a company deal less with details of the operational activities and deal more with the higher meaningful aggregatio
mylen [45]

Answer:

3. Granularity

Explanation:

Granularity's concept is representing the level of how do we store the data in our database.

If the data are detailed, we can resume the data until get a granularity more strong for our analysis.

For example:

We could store data year by year of our costumers, if want to get more granularity, we could store data month by month, also we could get specific data like how often our customers visit the business or how often our customers buy in a category product.

4 0
2 years ago
In javascript, what can I put after player. to make my character go in the center of the screen? like example:
melamori03 [73]

Answer:

0,0

Explanation:

you could try to use the x-axis and y-axis to put your character in a certain place. I'm not totally sure if that is how javascript works, but for the x-axis and y-axis, the center is always(0,0).

6 0
3 years ago
All of the following are benefits of automation except
Tasya [4]

Question 1:

4. it increases the number of employees

Question 2:

2. false

Question 3:

2. it causes great damage to the ozone layer

Question 4:

1. true



6 0
3 years ago
What is a Caesar cipher? As part of your answer demonstrate encrypting the plaintext messages: CS IS COOL with a caesar cipher.
sweet [91]

Answer:

A Caesar Cipher is a basic encryption type.

Explanation:

Its implementation is very easy and straightforward. It uses a one-to-one of characters in a character set. The input needed is the plain-text message and the encryption number.

For example, using the character set A-Z, encrypting the text CS IS COOL using the key of 3 generates FV LV FRRO. What has been done here is to take each character in the plain-text message and move it by "encryption number steps" in the character set.

8 0
3 years ago
Other questions:
  • J=2
    7·1 answer
  • I'm 11, except my profile says I'm 15.
    15·1 answer
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • What do you find when you first open a word processor and how do you adjust the document Indentitions
    6·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • Hey guys im just curious.... whats ur favorite number
    6·2 answers
  • Write a function named last_digit that returns the last digit of an integer. For example, last_digit(3572) should return 2. It s
    5·1 answer
  • You upgrade a graphics workstation with a HyperThreading-enabled CPU core. You expect the programs on the desktop to run much fa
    12·1 answer
  • Compare the graphs. Find the value of h, k, or a.
    7·1 answer
  • To use the replace feature we can simply just press Carl+h,Carl+c,Carl+r
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!